1
0
Fork 0
mirror of https://github.com/on4kjm/FLEcli.git synced 2025-01-31 14:51:04 +01:00
FLEcli/notes/enableGo.md
Bryan Nehl 89d7cbd955
revised developer notes, added Table of Contents (#93)
* revised developer notes, add ToC

* add goreleaser doc
2023-06-10 21:26:59 +02:00

1.7 KiB

Enable GO

Notes to enable/configure GO on my Mac

# GOlang related
export GOPATH="${HOME}/.go"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
test -d "${GOPATH}" || mkdir "${GOPATH}"
test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"

Cobra

Cobra documentation:

Setting up project to use Cobra:

  • go get -u github.com/spf13/cobra/cobra
  • go mod init FLEcli
  • cobra init --pkg-name FLEcli -l MIT
  • cobra add load adds a load command

Reading and processing file

Regex

Parsing 2