Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imghost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
imghost
Commits
6c4c4da0
Commit
6c4c4da0
authored
7 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Removed unnecessary code, minor cleanup
parent
455aa1ed
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.go
+4
-11
4 additions, 11 deletions
main.go
with
4 additions
and
11 deletions
main.go
+
4
−
11
View file @
6c4c4da0
...
...
@@ -93,13 +93,6 @@ func returnResult(writer http.ResponseWriter, result Result) error {
return
nil
}
func
printHeaders
(
r
*
http
.
Request
)
{
fmt
.
Println
(
r
.
URL
)
for
key
,
value
:=
range
r
.
Header
{
fmt
.
Printf
(
" %s: %s
\n
"
,
key
,
value
)
}
}
type
UserInfo
struct
{
Id
string
Name
string
...
...
@@ -134,8 +127,8 @@ func main() {
user
:=
parseUser
(
r
)
r
.
ParseMultipartForm
(
32
<<
20
)
file
,
file
header
,
err
:=
r
.
FormFile
(
"file"
)
image
,
err
:=
createImage
(
&
config
,
file
,
file
header
)
file
,
header
,
err
:=
r
.
FormFile
(
"file"
)
image
,
err
:=
createImage
(
&
config
,
file
,
header
)
if
err
!=
nil
{
returnResult
(
w
,
Result
{
Id
:
""
,
...
...
@@ -242,11 +235,11 @@ func main() {
images
=
append
(
images
,
info
)
}
t
emplate
,
err
:=
template
.
New
(
"me_images"
)
.
ParseFiles
(
"templates/me_images"
)
pageT
emplate
,
err
:=
template
.
New
(
"me_images"
)
.
ParseFiles
(
"templates/me_images"
)
if
err
!=
nil
{
panic
(
err
)
}
err
=
t
emplate
.
Execute
(
w
,
ImageListData
{
err
=
pageT
emplate
.
Execute
(
w
,
ImageListData
{
user
,
images
,
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment