当前位置:网站首页>Go language-1-development environment configuration

Go language-1-development environment configuration

2022-07-05 10:42:00 hahyyy

Catalog

Go install

Linux Platform installation Go

Use Linux, You can quickly install in the following ways

Set the environment variable

Check

Mac Platform installation Go

Windows Platform installation Go

download

install msi file

Add the installation path to the environment variable

Check

IDE install

download Vim Configuration tool

Get into lexVim Catalog , download go ide The required binaries

Start the installation script

Windows platform GoLand install

Test tool installation

Linux platform Curl Tools

Windows platform APIPOST install


Go install

Go There are many ways to install , such as Go Source code installation 、Go Standard package installation 、 Third party tools (yum、apt-get etc. ) install

Two environment variables :

  • GOROOT:GOROOT Namely Go Installation path for
  • GOPATH:GOPATH It is used as the storage destination and import Search path at package time ( In fact, it is also a working directory )


Linux Platform installation Go

Use Linux, You can quickly install in the following ways

Set the environment variable

stay ~/.bashrc Add GOPATH Variable

vim ~/.bashrc

After adding --> source ~/.bashrc

Check



Mac Platform installation Go



Windows Platform installation Go

download

Download path :https://golang.google.cn/dl/go1.18.3.windows-amd64.msi

install msi file

Add the installation path to the environment variable

Such as :go The installation to C:\Program Files\Go Catalog , Then add the environment variable GOPATH: C:\Program Files\Go\

And will %GOPATH%\bin Add to PATH

Check

open cmd Command line , Input : go version


IDE install

Vim yes Linux The most basic tool developed under , You can configure a Vim IDE. We can use open source installation tools , Here, you can directly use this tool to realize one click configuration .

download Vim Configuration tool

$ git clone https://github.com/lexkong/lexVim

Get into lexVim Catalog , download go ide The required binaries

$ cd lexVim

$ git clone https://github.com/lexkong/vim-go-ide-bin

Start the installation script

$ ./start_vim.sh



Windows platform GoLand install

Download address :https://www.jetbrains.com/go/

You can try 30 Days or self cracking



Test tool installation

Linux platform Curl Tools

install curl

 

Usage method

https://www.ruanyifeng.com/blog/2011/09/curl.html

https://www.ruanyifeng.com/blog/2019/09/curl-reference.html

Windows platform APIPOST install

Download address :https://www.apipost.cn/?utm_source=10039&bd_vid=10756414022759907776

There is no special need, just install it in the next step

原网站

版权声明
本文为[hahyyy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207051022404372.html