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 740c09d commit 15a41b4Copy full SHA for 15a41b4
auth-basic-custom/main.go
@@ -85,7 +85,7 @@ func main() {
85
},
86
}
87
handler.SetRoutes(
88
- rest.Route{"GET", "/countries", GetAllCountries},
+ &rest.Route{"GET", "/countries", GetAllCountries},
89
)
90
http.ListenAndServe(":8080", &handler)
91
auth-basic/main.go
@@ -29,7 +29,7 @@ func main() {
29
30
31
32
33
34
35
cors-custom/main.go
@@ -89,7 +89,7 @@ func main() {
92
93
94
95
cors/main.go
countries/main.go
@@ -26,10 +26,10 @@ func main() {
26
EnableRelaxedContentType: true,
27
28
- rest.Route{"POST", "/countries", PostCountry},
- rest.Route{"GET", "/countries/:code", GetCountry},
- rest.Route{"DELETE", "/countries/:code", DeleteCountry},
+ &rest.Route{"POST", "/countries", PostCountry},
+ &rest.Route{"GET", "/countries/:code", GetCountry},
+ &rest.Route{"DELETE", "/countries/:code", DeleteCountry},
gae/gaecountries/main.go
@@ -24,10 +24,10 @@ func init() {
24
25
handler := rest.ResourceHandler{}
http.Handle("/", &handler)
gorm/main.go
@@ -33,11 +33,11 @@ func main() {
36
- rest.RouteObjectMethod("GET", "/reminders", &api, "GetAllReminders"),
37
- rest.RouteObjectMethod("POST", "/reminders", &api, "PostReminder"),
38
- rest.RouteObjectMethod("GET", "/reminders/:id", &api, "GetReminder"),
39
- rest.RouteObjectMethod("PUT", "/reminders/:id", &api, "PutReminder"),
40
- rest.RouteObjectMethod("DELETE", "/reminders/:id", &api, "DeleteReminder"),
+ &rest.RouteObjectMethod("GET", "/reminders", &api, "GetAllReminders"),
+ &rest.RouteObjectMethod("POST", "/reminders", &api, "PostReminder"),
+ &rest.RouteObjectMethod("GET", "/reminders/:id", &api, "GetReminder"),
+ &rest.RouteObjectMethod("PUT", "/reminders/:id", &api, "PutReminder"),
+ &rest.RouteObjectMethod("DELETE", "/reminders/:id", &api, "DeleteReminder"),
41
42
43
helloworld/main.go
@@ -19,7 +19,7 @@ type Message struct {
19
func main() {
20
21
22
- rest.Route{
+ &rest.Route{
23
"GET",
"/message",
func(w rest.ResponseWriter, req *rest.Request) {
spdy/main.go
@@ -32,7 +32,7 @@ func GetUser(w rest.ResponseWriter, req *rest.Request) {
- rest.Route{"GET", "/users/:id", GetUser},
+ &rest.Route{"GET", "/users/:id", GetUser},
log.Fatal(spdy.ListenAndServeTCP(":8080", &handler))
status-auth/main.go
@@ -31,8 +31,8 @@ func main() {
- rest.Route{"GET", "/.status",
+ &rest.Route{"GET", "/.status",
auth.MiddlewareFunc(
func(w rest.ResponseWriter, r *rest.Request) {
w.WriteJson(handler.GetStatus())
0 commit comments