diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 57856050f..908b53a8a 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -41,7 +41,7 @@ jobs: - name: Go fmt run: | cd "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox" - find . -name "*.go" -exec go fmt {} \; + find . -name "*.go" -exec gofmt -s -w {} \; shell: bash - name: Go generate diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 873d83b36..ce400b209 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -46,6 +46,12 @@ jobs: with: go-version: ${{ matrix.go }} + - name: Go fmt + run: | + cd "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox" + find . -name "*.go" -exec gofmt -s -w {} \; + shell: bash + - name: Build run: | cd "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox" diff --git a/netbox/dcim/resource_netbox_dcim_site.go b/netbox/dcim/resource_netbox_dcim_site.go index 6dd136cd4..634bb6dfe 100644 --- a/netbox/dcim/resource_netbox_dcim_site.go +++ b/netbox/dcim/resource_netbox_dcim_site.go @@ -142,7 +142,7 @@ func ResourceNetboxDcimSite() *schema.Resource { Optional: true, Default: "active", ValidateFunc: validation.StringInSlice([]string{"planned", "staging", "active", "decommisioning", "retired"}, false), - Description: "The status of this site. Alowed values: \"active\" (default), \"planned\", \"staging\", \"decommisioning\", \"retired\".", + Description: "The status of this site. Allowed values: \"active\" (default), \"planned\", \"staging\", \"decommisioning\", \"retired\".", }, "tag": &tag.TagSchema, "tenant_id": { diff --git a/tools/tools.go b/tools/tools.go index f03ce3ddd..8abc7c8d8 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools package tools