From 6fc5d416a289235dd4bb56d29fb96c5a003ea89f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 11 Jun 2022 22:30:35 -0600 Subject: use %v when possible Exceptions are - the occasional %x when the type is a basic int - %w - %q - %T - whenever print_tree.go needs to be dumb for compatibility with C --- pkg/binstruct/binint/builtins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/binstruct/binint') diff --git a/pkg/binstruct/binint/builtins.go b/pkg/binstruct/binint/builtins.go index 9af3c35..04fc477 100644 --- a/pkg/binstruct/binint/builtins.go +++ b/pkg/binstruct/binint/builtins.go @@ -7,7 +7,7 @@ import ( func needNBytes(t interface{}, dat []byte, n int) error { if len(dat) < n { - return fmt.Errorf("%T.UnmarshalBinary: need at least %d bytes, only have %d", t, n, len(dat)) + return fmt.Errorf("%T.UnmarshalBinary: need at least %v bytes, only have %v", t, n, len(dat)) } return nil } -- cgit v1.2.3-2-g168b