mirror of
https://github.com/danderson/netboot.git
synced 2025-12-16 06:51:37 +01:00
pixiecore/api-example: unexport the HTTP handler function.
This commit is contained in:
parent
2fe08ecbf6
commit
8293616a81
@ -35,11 +35,11 @@ var (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
http.HandleFunc("/v1/boot/", API)
|
http.HandleFunc("/v1/boot/", api)
|
||||||
http.ListenAndServe(":"+strconv.Itoa(*port), nil)
|
http.ListenAndServe(":"+strconv.Itoa(*port), nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func API(w http.ResponseWriter, r *http.Request) {
|
func api(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Printf("Serving boot config for %s", filepath.Base(r.URL.Path))
|
log.Printf("Serving boot config for %s", filepath.Base(r.URL.Path))
|
||||||
resp := struct {
|
resp := struct {
|
||||||
K string `json:"kernel"`
|
K string `json:"kernel"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user