mirror of
https://github.com/docker/cli.git
synced 2026-01-18 08:21:31 +03:00
Merge pull request #12598 from runcom/remove-writeJSONEnv
Remove writeJSONEnv, fixes #12597 Upstream-commit: 371b39c26f3770af8c63162b927b07207764f4b5 Component: engine
This commit is contained in:
@@ -223,14 +223,6 @@ func httpError(w http.ResponseWriter, err error) {
|
||||
http.Error(w, err.Error(), statusCode)
|
||||
}
|
||||
|
||||
// writeJSONEnv writes the engine.Env values to the http response stream as a
|
||||
// json encoded body.
|
||||
func writeJSONEnv(w http.ResponseWriter, code int, v engine.Env) error {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(code)
|
||||
return v.Encode(w)
|
||||
}
|
||||
|
||||
// writeJSON writes the value v to the http response stream as json with standard
|
||||
// json encoding.
|
||||
func writeJSON(w http.ResponseWriter, code int, v interface{}) error {
|
||||
|
||||
Reference in New Issue
Block a user