From 70db55d66e2ccd5a5fc310e87c78670013a30f09 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Thu, 17 Mar 2016 16:45:13 -0600 Subject: [PATCH] fix(httputil): change order of struct fields This is because the marshals traverse structs in field order, and it makes more sense for the fields to have status first and details second. --- pkg/httputil/httperrors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/httputil/httperrors.go b/pkg/httputil/httperrors.go index 551dc8f54..6be920a73 100644 --- a/pkg/httputil/httperrors.go +++ b/pkg/httputil/httperrors.go @@ -38,8 +38,8 @@ const ( // For example, and error can be serialized to JSON or YAML. Likewise, the // string marshal can convert it to a string. type Error struct { - Msg string `json:"message, omitempty"` Status string `json:"status"` + Msg string `json:"message, omitempty"` } // Error implements the error interface.