Skip to content

Commit 9121533

Browse files
committed
generate -x
1 parent a71d6ad commit 9121533

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ Additional documentation, including available resources and their arguments/attr
4343

4444
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).
4545

46-
To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
46+
If any file in `gen` directory has been modified, run all the generators:
4747

48-
To generate or update documentation, run `go generate`.
48+
```shell
49+
go generate -x
50+
```
51+
52+
To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
4953

5054
In order to run the full suite of Acceptance tests, run `make testacc`. Make sure the respective environment variables are set (e.g., `IOSXE_USERNAME`, `IOSXE_PASSWORD`, `IOSXE_URL`).
5155

main.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,19 @@ import (
2525
"github.com/hashicorp/terraform-plugin-framework/providerserver"
2626
)
2727

28-
// Run "go generate" to format example terraform files and generate the docs for the registry/website
29-
30-
// Donwload YANG models.
28+
// Download the YANG models.
3129
//go:generate go run gen/load_models.go
3230

33-
// Run the resource and datasource generation tool.
31+
// Having YANG models as input, generate code (Go and Terraform).
3432
//go:generate go run gen/generator.go
3533

36-
// Format code and cleanup imports
34+
// Format Go code and cleanup imports.
3735
//go:generate go run golang.org/x/tools/cmd/goimports -w internal/provider/
3836

39-
// If you do not have terraform installed, you can remove the formatting command, but its suggested to
40-
// ensure the documentation is formatted properly.
37+
// Format Terraform code.
4138
//go:generate terraform fmt -recursive ./examples/
4239

40+
// Having Terraform code as input, generate documentation.
4341
// Run the docs generation tool, check its repository for more information on how it works and how docs
4442
// can be customized.
4543
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

0 commit comments

Comments
 (0)