Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aksel Baardsen
Assignment 1
Commits
05d0bc8d
Commit
05d0bc8d
authored
Oct 19, 2019
by
Aksel Baardsen
Browse files
commented main.go
parent
94b18f48
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.go
View file @
05d0bc8d
...
...
@@ -15,6 +15,7 @@ func main() {
port
=
"5000"
}
// creating a subrouter with a fixed path
c
:=
r
.
PathPrefix
(
"/conservation/v1"
)
.
Methods
(
"GET"
)
.
Subrouter
()
// two handlerpaths makes sure that the caller does not HAVE to specify limit
...
...
@@ -31,6 +32,7 @@ func main() {
c
.
Path
(
"/diag/"
)
.
HandlerFunc
(
handler
.
Dhandler
)
// makes sure that the router r handles all http-requests
http
.
Handle
(
"/"
,
r
)
log
.
Fatal
(
http
.
ListenAndServe
(
":"
+
port
,
nil
))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment