(w http.ResponseWriter, r *http.Request)
| 186 | } |
| 187 | |
| 188 | func (h *handler) version(w http.ResponseWriter, r *http.Request) { |
| 189 | version := upgrade.GetVersion() |
| 190 | b, err := json.Marshal(&UIServerVersion{ |
| 191 | Version: version, |
| 192 | DevSpace: true, |
| 193 | }) |
| 194 | if err != nil { |
| 195 | http.Error(w, err.Error(), http.StatusInternalServerError) |
| 196 | return |
| 197 | } |
| 198 | |
| 199 | w.Header().Set("Content-Type", "application/json") |
| 200 | _, _ = w.Write(b) |
| 201 | } |
| 202 | |
| 203 | type returnConfig struct { |
| 204 | Config *latest.Config `yaml:"config"` |
nothing calls this directly
no test coverage detected