Skip to content

Commit

Permalink
Fix format string type error (#416)
Browse files Browse the repository at this point in the history
`groups` is not a boolean (`%t`), but a pointer. I think this was meant
to print the type (`%T`).

Without this change you get the following error when building on Go 1.10:

```
cmd/sonobuoy/app/rbac.go:108: Errorf format %t has arg groups of wrong type *github.com/heptio/sonobuoy/vendor/k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList
```

Signed-off-by: Dan Miller <dmiller@windmill.engineering>
  • Loading branch information
Dan Miller authored and chuckha committed Apr 19, 2018
1 parent 6c2c077 commit 65c8375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/sonobuoy/app/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func checkRBACEnabled(client rest.Interface) (bool, error) {

groups, ok := result.(*metav1.APIGroupList)
if !ok {
return false, fmt.Errorf("Unknown type for API group %t", groups)
return false, fmt.Errorf("Unknown type for API group %T", groups)
}

for _, group := range groups.Groups {
Expand Down

0 comments on commit 65c8375

Please sign in to comment.