MCPcopy Create free account
hub / github.com/cloud66-oss/starter / Error

Method Error

api.go:54–60  ·  view source on GitHub ↗
(w rest.ResponseWriter, error string, error_code int, http_code int)

Source from the content-addressed store, hash-verified

52var languages = SupportedLanguages{}
53
54func (a *API) Error(w rest.ResponseWriter, error string, error_code int, http_code int) {
55 w.WriteHeader(http_code)
56 err := w.WriteJson(map[string]string{"Error": error, "ErrorCode": strconv.Itoa(error_code)})
57 if err != nil {
58 panic(err)
59 }
60}
61
62// StartAPI starts the API listeners
63func (a *API) StartAPI() error {

Callers 15

dockerfilesMethod · 0.95
uploadMethod · 0.95
analyzeMethod · 0.95
StartAPIMethod · 0.80
analyze_sourcecodeFunction · 0.80
mainFunction · 0.80
analyzeFunction · 0.80
CheckErrorFunction · 0.80
UnmarshalFromFileMethod · 0.80
CheckErrorFunction · 0.80
UnmarshalFromFileMethod · 0.80
CheckErrorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected