lang: Fix error message format strings
This commit replaces %s with %d in two error messages, where the argument is an integer, not a string.
This commit is contained in:
committed by
James Shubin
parent
b9d0cc2e28
commit
de90b592fb
@@ -2637,7 +2637,7 @@ func (obj *ExprStruct) Type() (*types.Type, error) {
|
|||||||
// vals
|
// vals
|
||||||
t, e := x.Value.Type()
|
t, e := x.Value.Type()
|
||||||
if e != nil {
|
if e != nil {
|
||||||
err = errwrap.Wrapf(e, "field val, index `%s` did not return a type", i)
|
err = errwrap.Wrapf(e, "field val, index `%d` did not return a type", i)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if _, exists := m[x.Name]; exists {
|
if _, exists := m[x.Name]; exists {
|
||||||
@@ -2782,7 +2782,7 @@ func (obj *ExprStruct) Value() (types.Value, error) {
|
|||||||
// vals
|
// vals
|
||||||
t, err := x.Value.Type()
|
t, err := x.Value.Type()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errwrap.Wrapf(err, "field val, index `%s` did not return a type", i)
|
return nil, errwrap.Wrapf(err, "field val, index `%d` did not return a type", i)
|
||||||
}
|
}
|
||||||
if _, exists := typ.Map[x.Name]; exists {
|
if _, exists := typ.Map[x.Name]; exists {
|
||||||
return nil, fmt.Errorf("struct type field index `%d` already exists", i)
|
return nil, fmt.Errorf("struct type field index `%d` already exists", i)
|
||||||
|
|||||||
Reference in New Issue
Block a user