We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15a41b4 commit 91bb3edCopy full SHA for 91bb3ed
helloworld/main.go
@@ -13,21 +13,17 @@ import (
13
)
14
15
type Message struct {
16
- Body string
+ Body string
17
}
18
19
func main() {
20
handler := rest.ResourceHandler{}
21
handler.SetRoutes(
22
- &rest.Route{
23
- "GET",
24
- "/message",
25
- func(w rest.ResponseWriter, req *rest.Request) {
26
- w.WriteJson(&Message{
27
- Body: "Hello World!",
28
- })
29
- },
30
+ &rest.Route{"GET", "/message", func(w rest.ResponseWriter, req *rest.Request) {
+ w.WriteJson(&Message{
+ Body: "Hello World!",
+ })
+ }},
31
32
http.ListenAndServe(":8080", &handler)
33
0 commit comments