官术网_书友最值得收藏!

Go language and tools

First and foremost, you'll need to install the Go programming language and tools on your machine. The installation process varies for different operating systems so please follow the instructions at https://golang.org/doc/install. On the installation page, you will find instructions for downloading Go for your platform, as well as the minimum operating system requirements.

It would be a good idea for you to spend some extra time browsing the Go programming language website to learn more about the language, read tutorials, and find the standard library documentation.

This is a screenshot from the installation page from the Go website, containing all of the instructions necessary for installing Go on your computer:

You can also build the language from source if you are so inclined. By the end of the installation, you should have the all of the Go libraries, the Go command line, and a simple hello world project built to ensure that everything was installed properly.

It is very important to follow the instructions all the way through testing your installation. Go can be a little tricky sometimes with respect to $GOPATH. Once you set up your $GOPATH, you must ensure that following is done:

  • You have the required src, bin, and pkg directories
  • All source code is contained within the src directory
  • The folder structure inside your src directory mimics what you want your package names to be

By completing the testing section, you will save yourself a lot of frustration in the future.

Since the release of version 1.11, the Go team has announced support for Go modules, which allows you to develop outside of the $GOPATH. Because this feature is still considered experimental, this book will continue with the classic method for Go development.
主站蜘蛛池模板: 堆龙德庆县| 洛隆县| 西安市| 新疆| 河北区| 郑州市| 克拉玛依市| 昌黎县| 乾安县| 德州市| 方城县| 中山市| 汶上县| 德惠市| 三原县| 汝南县| 黎川县| 昭苏县| 双牌县| 新河县| 梅州市| 历史| 崇州市| 崇礼县| 桃江县| 鄂托克前旗| 花莲市| 贵溪市| 张家界市| 湟中县| 井冈山市| 巫山县| 聂拉木县| 新平| 铁岭市| 兰考县| 嘉义市| 阿拉善左旗| 大余县| 靖江市| 贡觉县|