From bbd2d46ac89962ed7d3bd8e5c7e489a96861dc36 Mon Sep 17 00:00:00 2001 From: Mathias Lafeldt Date: Tue, 18 Feb 2020 10:36:57 +0100 Subject: [PATCH] backend/remote-state/oss: Format code using goimports --- backend/remote-state/oss/backend.go | 18 ++++++++++-------- backend/remote-state/oss/backend_state.go | 3 ++- backend/remote-state/oss/client.go | 7 ++++--- backend/remote-state/oss/client_test.go | 1 + 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/backend/remote-state/oss/backend.go b/backend/remote-state/oss/backend.go index 8e868c1761..5e72684705 100644 --- a/backend/remote-state/oss/backend.go +++ b/backend/remote-state/oss/backend.go @@ -4,6 +4,11 @@ import ( "context" "encoding/json" "fmt" + "io/ioutil" + "os" + "runtime" + "strings" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" "github.com/aliyun/alibaba-cloud-sdk-go/services/sts" @@ -12,10 +17,11 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/jmespath/go-jmespath" - "io/ioutil" - "os" - "runtime" - "strings" + + "log" + "net/http" + "strconv" + "time" "github.com/aliyun/alibaba-cloud-sdk-go/sdk" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials" @@ -24,10 +30,6 @@ import ( "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/terraform/version" "github.com/mitchellh/go-homedir" - "log" - "net/http" - "strconv" - "time" ) // New creates a new backend for OSS remote state. diff --git a/backend/remote-state/oss/backend_state.go b/backend/remote-state/oss/backend_state.go index 28c40ee4af..af6f456287 100644 --- a/backend/remote-state/oss/backend_state.go +++ b/backend/remote-state/oss/backend_state.go @@ -12,9 +12,10 @@ import ( "github.com/hashicorp/terraform/state/remote" "github.com/hashicorp/terraform/states" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" "log" "path" + + "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" ) const ( diff --git a/backend/remote-state/oss/client.go b/backend/remote-state/oss/client.go index e50f801e84..e40faf5dfe 100644 --- a/backend/remote-state/oss/client.go +++ b/backend/remote-state/oss/client.go @@ -8,6 +8,10 @@ import ( "io" "encoding/hex" + "log" + "sync" + "time" + "github.com/aliyun/aliyun-oss-go-sdk/oss" "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" "github.com/hashicorp/go-multierror" @@ -16,9 +20,6 @@ import ( "github.com/hashicorp/terraform/state" "github.com/hashicorp/terraform/state/remote" "github.com/pkg/errors" - "log" - "sync" - "time" ) // Store the last saved serial in tablestore with this suffix for consistency checks. diff --git a/backend/remote-state/oss/client_test.go b/backend/remote-state/oss/client_test.go index 1749765264..4862170801 100644 --- a/backend/remote-state/oss/client_test.go +++ b/backend/remote-state/oss/client_test.go @@ -8,6 +8,7 @@ import ( "bytes" "crypto/md5" + "github.com/hashicorp/terraform/backend" "github.com/hashicorp/terraform/state" "github.com/hashicorp/terraform/state/remote"