MCPcopy Index your code
hub / github.com/devspace-sh/devspace / version

Method version

pkg/devspace/server/server.go:188–201  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

186}
187
188func (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
203type returnConfig struct {
204 Config *latest.Config `yaml:"config"`

Callers

nothing calls this directly

Calls 4

GetVersionFunction · 0.92
ErrorMethod · 0.45
SetMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected