google / yamlfmt

An extensible command line tool or library to format yaml files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Working Install Instructions

jamesbraza opened this issue · comments

Following the currently suggested install instructions: go install github.com/google/yamlfmt/cmd/yamlfmt@latest

> go install github.com/google/yamlfmt/cmd/yamlfmt@latest
go: downloading github.com/google/yamlfmt v0.5.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/RageCage64/multilinediff v0.2.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/bmatcuk/doublestar/v4 v4.2.0
go: downloading github.com/RageCage64/go-utf8-codepoint-converter v0.1.0
go: downloading github.com/google/go-cmp v0.5.9
> yamlfmt
zsh: command not found: yamlfmt

The request is to have working install instructions in the README. Excited to start using yamlfmt!

Thanks for making an issue!
go install actually installs the binary to the GOBIN environment variable, which is by default $HOME/go/bin. If you add $HOME/go/bin to your path this should work. I forgot that this wasn't done by default. I'll adjust the install instructions to mention that.

Yeah fwiw I added this to my ~/.zshrc: export PATH=$PATH:$(go env GOPATH)/bin.

Thank you!

Sorry I'd forgotten about this. In #73 I included a new line to suggest a DigitalOcean article that has a go install setup guide. Hopefully this should work!