jehiah / json2csv

command line tool to convert json to csv
MIT License
801 stars 94 forks source link

bash: json2csv: command not found... #25

Closed Tavpritesh closed 9 years ago

Tavpritesh commented 9 years ago

I'm sorry for asking a basic question but I'm new to golang. Running go get github.com/jehiah/json2csv on my CentOS 7 finished without any error but json2csv resulted in the error, bash: json2csv: command not found.... Please suggest where am I going wrong. P.S. I had to reset GOROOT to allow installation to end successfully as suggested on this page.

jehiah commented 9 years ago

when go get compiles a command line tool it places it in $GOPATH/bin So you either need to run it with the full path to that folder, or add that directory to $PATH (typically done in ~/.bash_profile).

For example, i use this in my ~/.bash_profile: export PATH="$(go env GOPATH)/bin:$(go env GOROOT)/bin:$PATH"

Tavpritesh commented 9 years ago

Thanks for the suggestion.