Skip to content

Commit

Permalink
Format Go files
Browse files Browse the repository at this point in the history
  • Loading branch information
remilapeyre committed Nov 7, 2023
1 parent b671571 commit d4f30af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion consul/data_source_consul_key_prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func dataSourceConsulKeyPrefixRead(d *schema.ResourceData, meta interface{}) err
}

fullPath := pathPrefix + path
_, value, _, err := keyClient.Get(fullPath)
_, value, _, err := keyClient.Get(fullPath)
if err != nil {
return err
}
Expand Down
7 changes: 0 additions & 7 deletions consul/data_source_consul_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)




func TestAccDataConsulKeysNonExistentKeys(t *testing.T) {
providers, _ := startTestServer(t)

Expand Down Expand Up @@ -65,7 +62,6 @@ func TestAccDataConsulKeysExistentKeyWithEmptyValueAndDefault(t *testing.T) {
})
}


func TestAccDataConsulKeys_basic(t *testing.T) {
providers, _ := startTestServer(t)

Expand Down Expand Up @@ -129,8 +125,6 @@ func TestAccDataConsulKeys_datacenter(t *testing.T) {
})
}



const testAccDataConsulKeysNonExistantKeyDefaultBehaviourConfig = `
data "consul_keys" "read" {
Expand All @@ -156,7 +150,6 @@ data "consul_keys" "read" {
}
`


const testAccDataConsulKeysNonExistantKeyWithDefaultConfig = `
data "consul_keys" "read" {
Expand Down
6 changes: 3 additions & 3 deletions consul/key_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ func (c *keyClient) Get(path string) (bool, string, int, error) {
return false, "", 0, fmt.Errorf("failed to read Consul key '%s': %s", path, err)
}
value := ""
if pair == nil {
if pair == nil {
return false, "", 0, nil
}
}

if pair != nil {
if pair != nil {
value = string(pair.Value)

}
Expand Down

0 comments on commit d4f30af

Please sign in to comment.