Skip to content

Commit

Permalink
revert main.go and fix linting for unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyz committed Oct 22, 2024
1 parent ad70419 commit 25db301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
15 changes: 2 additions & 13 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
package main

import (
"flag"

"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
"github.com/terraform-providers/terraform-provider-postgresql/postgresql"
)

func main() {
var debug bool

flag.BoolVar(&debug, "debug", false, "set to true to run the provider with support for debuggers like delve")
flag.Parse()

opts := &plugin.ServeOpts{
Debug: debug,
ProviderFunc: postgresql.Provider,
ProviderAddr: "registry.terraform.io/cyrilgdn/postgresql",
}
plugin.Serve(opts)
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: postgresql.Provider})
}
3 changes: 3 additions & 0 deletions postgresql/resource_postgresql_security_label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ func testAccCheckPostgresqlSecurityLabelExists(n string) resource.TestCheckFunc
}

provider, ok := rs.Primary.Attributes[securityLabelProviderAttr]
if !ok {
return fmt.Errorf("No Attribute for security provider is set")
}

client := testAccProvider.Meta().(*Client)
txn, err := startTransaction(client, "")
Expand Down

0 comments on commit 25db301

Please sign in to comment.