Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md - add tools.go quick example #289

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,29 @@ You can install a copy of the binary manually from the [releases](https://github
or you can optionally use the [tools.go model](https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md)
for tool installation.

> [!NOTE]
>
> Here is a brief `./tools/tools.go` example from https://github.com/hashicorp/terraform-provider-scaffolding-framework:
>
> ```go
> //go:build tools
>
> package tools
>
> import (
> // Documentation generation
> _ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs"
> )
> ```
thiskevinwang marked this conversation as resolved.
Show resolved Hide resolved
>
> Then run the following to install and verify `tfplugindocs`:
> ```console
> export GOBIN=$PWD/bin
> export PATH=$GOBIN:$PATH
> go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
> which tfplugindocs
> ```

### Usage

```shell
Expand Down