diff --git a/manager/dirty.go b/manager/dirty.go index c989ec2c86..2f3460436f 100644 --- a/manager/dirty.go +++ b/manager/dirty.go @@ -1,6 +1,7 @@ package manager import ( + "fmt" "reflect" "github.com/docker/swarmkit/api" @@ -45,7 +46,7 @@ func (m *Manager) IsStateDirty() (bool, error) { field := val.Field(i) structField := val.Type().Field(i) if structField.Type.Kind() != reflect.Slice { - panic("unexpected field type in StoreSnapshot") + panic(fmt.Sprintf("unexpected field type in StoreSnapshot: %s (type %v)", structField.Name, structField.Type.Kind())) } if structField.Name != "Nodes" && structField.Name != "Clusters" && structField.Name != "Networks" && field.Len() != 0 { // One of the other data types has an entry diff --git a/protobuf/plugin/deepcopy/test/deepcopypb_test.go b/protobuf/plugin/deepcopy/test/deepcopypb_test.go index f542bb67d0..e1c2d168c7 100644 --- a/protobuf/plugin/deepcopy/test/deepcopypb_test.go +++ b/protobuf/plugin/deepcopy/test/deepcopypb_test.go @@ -4,15 +4,16 @@ package test import ( - fmt "fmt" + "fmt" + "math" + math_rand "math/rand" + "testing" + "time" + _ "github.com/gogo/protobuf/gogoproto" github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" ) // Reference imports to suppress errors if they are not otherwise used.