From 4a10540971d0f4448e4d97a0ed314c12d179702f Mon Sep 17 00:00:00 2001 From: "Anders R. Thorbeck" Date: Fri, 12 Apr 2024 10:16:23 +0200 Subject: [PATCH 1/4] Document need to add GOPATH/bin to PATH to run CLI Not being a Go developer, it caught me off guard that this wasn't added to the PATH by default, so I was wondering whether the CLI had been correctly installed. Explicitly adding it to the PATH as indicated by the linked comment fixed the issue. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 15f2f45..a3c4779 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ The primary way to use this repository is as a Go library, but as a convenience it also contains a CLI tool called `terraform-config-inspect`, installed automatically by the `go get` command above, that allows viewing module information in either a Markdown-like format or in JSON format. +You need to [explicitly add `$GOPATH/bin` to your `PATH`](https://github.com/actions/setup-go/issues/27#issuecomment-549102955) +to run this CLI without qualifying the full path. ```sh $ terraform-config-inspect path/to/module From 511a124b88b791f370beff2df900d46e14e9c06e Mon Sep 17 00:00:00 2001 From: "Anders R. Thorbeck" Date: Thu, 20 Jun 2024 16:44:05 +0200 Subject: [PATCH 2/4] Remove link to unrelated GitHub issue comment --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a3c4779..0183374 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The primary way to use this repository is as a Go library, but as a convenience it also contains a CLI tool called `terraform-config-inspect`, installed automatically by the `go get` command above, that allows viewing module information in either a Markdown-like format or in JSON format. -You need to [explicitly add `$GOPATH/bin` to your `PATH`](https://github.com/actions/setup-go/issues/27#issuecomment-549102955) +You need to explicitly add `$GOPATH/bin` to your `PATH` to run this CLI without qualifying the full path. ```sh From b157dabd243c3d1bdc9c47d96b142cf1f1957fc5 Mon Sep 17 00:00:00 2001 From: "Anders R. Thorbeck" Date: Thu, 20 Jun 2024 16:44:53 +0200 Subject: [PATCH 3/4] Reference GOBIN instead of GOPATH/bin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … to stay more Go idiomatic. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0183374..008230a 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ The primary way to use this repository is as a Go library, but as a convenience it also contains a CLI tool called `terraform-config-inspect`, installed automatically by the `go get` command above, that allows viewing module information in either a Markdown-like format or in JSON format. -You need to explicitly add `$GOPATH/bin` to your `PATH` -to run this CLI without qualifying the full path. +You need to explicitly add `$GOBIN` to your `PATH` to run this CLI without +qualifying the full path. ```sh $ terraform-config-inspect path/to/module From 3953a4fdef14442c5fc73da695ba0b95c9a9151b Mon Sep 17 00:00:00 2001 From: "Anders R. Thorbeck" Date: Thu, 20 Jun 2024 16:46:28 +0200 Subject: [PATCH 4/4] Update outdated command reference: go get -> go install --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 008230a..ecdb6ec 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ be lower in older language versions. The primary way to use this repository is as a Go library, but as a convenience it also contains a CLI tool called `terraform-config-inspect`, installed -automatically by the `go get` command above, that allows viewing module +automatically by the `go install` command above, that allows viewing module information in either a Markdown-like format or in JSON format. You need to explicitly add `$GOBIN` to your `PATH` to run this CLI without qualifying the full path.