How to update Golang

  • For updating golang, you need to first uninstall golang. Check where is the go directory. Run which go. The output might be similar to:-

    souvik:Development souvikhaldar$ which go
  • Delete the directory as is the output above.

    sudo rm -rf /usr/local/bin/go
  • Now install the required version. Visit this link

  • Check the version by running :-

    souvik:~ souvikhaldar$ go version
    go version go1.12.3 darwin/amd64