mirror of https://github.com/docker/docs.git
18 lines
327 B
Go
18 lines
327 B
Go
package handlers
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
func MainHandler(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method == "GET" {
|
|
err := json.NewEncoder(w).Encode("{}")
|
|
if err != nil {
|
|
w.Write([]byte("{server_error: 'Could not parse error message'}"))
|
|
}
|
|
} else {
|
|
w.WriteHeader(http.StatusNotFound)
|
|
}
|
|
}
|