Ahmad Awais

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 →

📨

TheDevTakeaway: Developers' Newsletter!

Takeaway my professional opinion about Open Source, JavaScript/Cloud, Full Stack Development, building a business, growing a family, and everything in between! Delivered to your inbox once a month. 🤣 I'm even funny some times. 👻 I hate spam! Pinky Promise!

Go

👨‍🏫 Edutainer at VSCode.pro 🎩 Full-time #OpenSourcerer 🥑 JavaScript Developer Advocate 🔥 Ridiculously hard-working Full Stack Web DeveloperRegular WordPress Core Developer 📣 TEDx Speaker ✌️ Spends 50-80% of his time building professional FOSS (Free & Open Source Software) used by over 218,900 Developers 🙌 Cloud Community Evangelist 🎯 JavaScript & DevOps fanboy 😂 Cracks silly jokes 💜 Loves his wife (Maedah) 🍕 Learn more about Ahmad ↣

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