From 482460c4c8a663ec2882bbddbb32da8e990de080 Mon Sep 17 00:00:00 2001 From: Emil Hessman Date: Wed, 14 Jan 2015 22:04:28 +0100 Subject: [PATCH] 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 --- config/lang/check_types.go | 2 +- config/lang/lex.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/lang/check_types.go b/config/lang/check_types.go index 5015781e8..85d720fa8 100644 --- a/config/lang/check_types.go +++ b/config/lang/check_types.go @@ -96,7 +96,7 @@ func (v *TypeCheck) visitConcat(n *ast.Concat) { for i, t := range types { if t != ast.TypeString { v.createErr(n, fmt.Sprintf( - "argument %d must be a sting", n, i+1)) + "argument %d must be a string", i+1)) return } } diff --git a/config/lang/lex.go b/config/lang/lex.go index ed1f8fb64..a1172b420 100644 --- a/config/lang/lex.go +++ b/config/lang/lex.go @@ -77,7 +77,7 @@ func (x *parserLex) lex(yylval *parserSymType) int { case parserModeInterpolation: return x.lexModeInterpolation(yylval) default: - x.Error(fmt.Sprintf("Unknown parse mode: %s", x.mode)) + x.Error(fmt.Sprintf("Unknown parse mode: %d", x.mode)) return lexEOF } }