From ccf0d8815f3a140357ce9eac5ccb814973fc3258 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 1 Dec 2020 10:48:55 -0500 Subject: [PATCH] staticcheck --- command/012_config_upgrade.go | 5 ++--- command/013_config_upgrade.go | 5 ++--- command/clistate/state_test.go | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/command/012_config_upgrade.go b/command/012_config_upgrade.go index 6d2ff2fdb..641080fc0 100644 --- a/command/012_config_upgrade.go +++ b/command/012_config_upgrade.go @@ -1,7 +1,6 @@ package command import ( - "fmt" "strings" ) @@ -10,10 +9,10 @@ type ZeroTwelveUpgradeCommand struct { } func (c *ZeroTwelveUpgradeCommand) Run(args []string) int { - c.Ui.Output(fmt.Sprintf(` + c.Ui.Output(` The 0.12upgrade command has been removed. You must run this command with Terraform v0.12 to upgrade your configuration syntax before upgrading to the -current version.`)) +current version.`) return 0 } diff --git a/command/013_config_upgrade.go b/command/013_config_upgrade.go index 53d65a2e6..5442bef14 100644 --- a/command/013_config_upgrade.go +++ b/command/013_config_upgrade.go @@ -1,7 +1,6 @@ package command import ( - "fmt" "strings" ) @@ -12,10 +11,10 @@ type ZeroThirteenUpgradeCommand struct { } func (c *ZeroThirteenUpgradeCommand) Run(args []string) int { - c.Ui.Output(fmt.Sprintf(` + c.Ui.Output(` The 0.13upgrade command has been removed. You must run this command with Terraform v0.13 to upgrade your provider requirements before upgrading to the -current version.`)) +current version.`) return 0 } diff --git a/command/clistate/state_test.go b/command/clistate/state_test.go index f1ba88ab8..7162538f1 100644 --- a/command/clistate/state_test.go +++ b/command/clistate/state_test.go @@ -2,7 +2,6 @@ package clistate import ( "context" - "fmt" "testing" "github.com/hashicorp/terraform/states/statemgr" @@ -18,7 +17,7 @@ func TestUnlock(t *testing.T) { err := l.Unlock(nil) if err != nil { - fmt.Printf(err.Error()) + t.Log(err.Error()) } else { t.Error("expected error") }