GSLabDev / terraform-provider-ad

Automates the Active Directory resource creation during Infrastructure build using Terraform Provider.
Mozilla Public License 2.0
61 stars 31 forks source link

Build (make build) fails on gofmt check #21

Closed ryno75 closed 4 years ago

ryno75 commented 4 years ago

The tip of master currently fails to make build stage fails on gofmt check with the following:

==> Checking that code complies with gofmt requirements...
gofmt needs running on the following files:
./ad/provider.go
./ad/resource_active_directory_user_test.go
./ad/resource_active_directory_user.go
You can use the command: `make fmt` to reformat code.
make: *** [GNUmakefile:32: fmtcheck] Error 1

If I simply run a make fmt on the repo and run a diff I see the following changes:

diff --git a/ad/provider.go b/ad/provider.go
index 9863ca4..2e8e830 100644
--- a/ad/provider.go
+++ b/ad/provider.go
@@ -46,7 +46,7 @@ func Provider() terraform.ResourceProvider {
                        "ad_computer_to_ou": resourceComputerToOU(),
                        "ad_group_to_ou":    resourceGroupToOU(),
                        "ad_add_to_group":   resourceAddToGroup(),
-                       "ad_user"       :    resourceUser(),
+                       "ad_user":           resourceUser(),
                },

                ConfigureFunc: providerConfigure,
diff --git a/ad/resource_active_directory_user.go b/ad/resource_active_directory_user.go
index 2e83df0..b238f58 100755
--- a/ad/resource_active_directory_user.go
+++ b/ad/resource_active_directory_user.go
@@ -181,4 +181,3 @@ func delUser(userName string, dnName string, adConn *ldap.Conn) error {
        }
        return nil
 }
-
diff --git a/ad/resource_active_directory_user_test.go b/ad/resource_active_directory_user_test.go
index 747b7fc..b3e9966 100755
--- a/ad/resource_active_directory_user_test.go
+++ b/ad/resource_active_directory_user_test.go
@@ -142,4 +142,3 @@ resource "ad_user" "test" {
                os.Getenv("AD_PASSWORD"),
                os.Getenv("AD_USER_DOMAIN"))
 }
-

Pretty easy fix.