Ahmad Awais

NAVIGATE


SHARE


Install Go Lang on MacOS with Homebrew!

Ahmad AwaisAhmad Awais

I’ve started learning Go lang. It seems to be built by the right people with the right expectations. So, the first thing I did was install go on Mac with Homebrew.

JUST A NOTE!
👨‍💻 I’m teaching thousands of devs how to become VSCode Power Users
✅ This site is super fast?! It’s hosted with Kinsta on Google servers →

First of all export some paths, and save them in your .zshrc or .bashrc files for easy use. Use sudo if you get error.

# Go development
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"

Then finally install go, with Homebrew.

brew install go

Also a bunch of dev tools!

go get golang.org/x/tools/cmd/godoc

go get github.com/golang/lint/golint

✅ This site is super fast?! It’s hosted with Kinsta on Google servers →
👨‍💻 Interested in learning tips/tricks of VSCode, I am launching a course →

VSCode FTW!#

I’m a big fan of VSCode, and have also started making a course on helping you become a Visual Studio Code Power user. So, I’ll be using that for writing/coding with go.

✅ Install this Go Extension for VSCode →

And we’re done. Let me know if you have any issues.

Peace! ✌

 

JUST A NOTE!
👨‍💻 I’m teaching thousands of devs how to become VSCode Power Users
✅ This site is super fast?! It’s hosted with Kinsta on Google servers →

Go

I help businesses understand developers 📟 Launching Node.js CLI Automation Course 👨‍🏫 Edutainer at VSCode.pro 🎩 An award-winning open-source engineer and developer advocate 🦊 Google Developers Expert for web 🌳 Node.js foundation Community Committee member ✌️ Author of various open-source dev-tools and software libraries used by millions of developers worldwide ⓦ WordPress Core Developer 📣 TEDx Speaker 🙌 Leading developers and publishing technical content for over a decade 😂 Self-confessed tech comedian working with the JavaScript web and cloud communities 💜 Loves his wife (Maedah) ❯ Learn more about Awais ↣

Say 👋 on Twitter @MrAhmadAwais | Subscribe to the Developers Takeaway!

📨

Developers Takeaway

Takeaway my professional opinion on open-source, developer relations, growing your business with family, and everything in between! Delivered to your inbox a couple of times every year. I'm even funny at times. I hate spam — pinky-promise!

👨‍💻👩‍💻 115,834 Developers Already Subscribed