(w http.ResponseWriter, r *http.Request)
| 40 | } |
| 41 | |
| 42 | func api(w http.ResponseWriter, r *http.Request) { |
| 43 | log.Printf("Serving boot config for %s", filepath.Base(r.URL.Path)) |
| 44 | resp := struct { |
| 45 | K string `json:"kernel"` |
| 46 | I []string `json:"initrd"` |
| 47 | }{ |
| 48 | K: "http://tinycorelinux.net/7.x/x86/release/distribution_files/vmlinuz64", |
| 49 | I: []string{ |
| 50 | "http://tinycorelinux.net/7.x/x86/release/distribution_files/rootfs.gz", |
| 51 | "http://tinycorelinux.net/7.x/x86/release/distribution_files/modules64.gz", |
| 52 | }, |
| 53 | } |
| 54 | |
| 55 | if err := json.NewEncoder(w).Encode(&resp); err != nil { |
| 56 | panic(err) |
| 57 | } |
| 58 | } |
nothing calls this directly
no outgoing calls
no test coverage detected