Golang Installation

[!TIP] This document is machine-translated by Google. If you find grammatical and semantic errors, and the document description is not clear, please PR

Forward

To develop a golang program, the installation of its environment must be indispensable. Here we choose to take 1.15.1 as an example.

Official document

https://golang.google.cn/doc/install

Install Go on macOS

  • Download and install Go for Mac
  • Verify the installation result
      $ go version
    
      go version go1.15.1 darwin/amd64
    

    Install Go on linux

  • Download Go for Linux
  • Unzip the compressed package to /usr/local
      $ tar -C /usr/local -xzf go1.15.8.linux-amd64.tar.gz
    
  • Add /usr/local/go/bin to environment variables
      $ $HOME/.profile
    
      export PATH=$PATH:/usr/local/go/bin
    
      $ source $HOME/.profile
    
  • Verify the installation result
      $ go version
    
      go version go1.15.1 linux/amd64
    

    Install Go on windows

  • Download and install Go for Windows
  • Verify the installation result
      $ go version
    
      go version go1.15.1 windows/amd64
    

More

For more operating system installation, see https://golang.org/dl/

Copyright © 2019-2021 go-zero all right reserved,powered by GitbookLast UpdateTime: 2021-12-05 09:48:50

results matching ""

    No results matching ""