diff options
Diffstat (limited to 'src/vendor/github.com/rs/cors/examples/default/server.go')
| -rw-r--r-- | src/vendor/github.com/rs/cors/examples/default/server.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/vendor/github.com/rs/cors/examples/default/server.go b/src/vendor/github.com/rs/cors/examples/default/server.go deleted file mode 100644 index ccb5e1b..0000000 --- a/src/vendor/github.com/rs/cors/examples/default/server.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "net/http" - - "github.com/rs/cors" -) - -func main() { - mux := http.NewServeMux() - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - w.Write([]byte("{\"hello\": \"world\"}")) - }) - - // Use default options - handler := cors.Default().Handler(mux) - http.ListenAndServe(":8080", handler) -} |
