Skip to content

Commit 482460c

Browse files
committed
config/lang: address vet reports
Fixes the following vet reports: config/lang/check_types.go:98: arg n for printf verb %d of wrong type: *github.com/hashicorp/terraform/config/lang/ast.Concat config/lang/lex.go:80: arg x.mode for printf verb %s of wrong type: lang.parserMode
1 parent 9ee3626 commit 482460c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎config/lang/check_types.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (v *TypeCheck) visitConcat(n *ast.Concat) {
9696
for i, t := range types {
9797
if t != ast.TypeString {
9898
v.createErr(n, fmt.Sprintf(
99-
"argument %d must be a sting", n, i+1))
99+
"argument %d must be a string", i+1))
100100
return
101101
}
102102
}

‎config/lang/lex.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (x *parserLex) lex(yylval *parserSymType) int {
7777
case parserModeInterpolation:
7878
return x.lexModeInterpolation(yylval)
7979
default:
80-
x.Error(fmt.Sprintf("Unknown parse mode: %s", x.mode))
80+
x.Error(fmt.Sprintf("Unknown parse mode: %d", x.mode))
8181
return lexEOF
8282
}
8383
}

0 commit comments

Comments
 (0)