5步搭建GO环境
来源:互联网 发布:文件档案管理系统软件 编辑:程序博客网 时间:2024/05/18 03:36
Easy Go Programming Setup for Windows
I’ve had to do this more than once recently, so I figured I’d document the simple steps for setting up the Go programming language on Windows. Most of this is simple and straightforward. The only tricky part I found is setting up your GOPATH, which defines a convention for storing and building Go code you write and acquire from open source code repositories.
5 Simple Steps
Follow these five simple steps to install Go.
Make sure you have both Git download and Mercurial download installed. With Go programming you’ll make heavy use of open source repositories.
Download and install the latest 64-bit Go MSI distributable (which sets most of the environmental variables for you). https://golang.org/dl/
To make things simple, use the default installation path at
C:\Go
Ensure the Go binaries (found in
C:\Go\bin
) are in yourPath
system environment variables. To check clickSystem
,Advanced system settings
,Environment Variables...
and openPath
underSystem variables
:An easy way to confirm is to open the command line and type
go version
:Setup your Go workspace. This consists of three folders at the root:
bin/ pkg/ src/
I create a
C:\Projects\Go
folder as my root Go workspace:Create the GOPATH environment variable and reference your Go workspace path. To add, click
System
,Advanced system settings
,Environment Variables...
and clickNew...
underSystem variables
:Set the variable name to
GOPATH
and value to your Go workspace path (e.g.C:\Projects\Go
):You can quickly check to ensure your path has been set by opening the command line and typing
echo %GOPATH%
and check the output:
And that’s all it takes! You’re ready to get started.
Verify
Want to quickly test and ensure this is all working as expected? Open the command line and type the following:
go get github.com/golang/example/hello%GOPATH%/bin/hello
You should see the output as “Hello, Go examples!” (refreshingly, not your typical hello world):
I hope this helps!
- 5步搭建GO环境
- 5步搭建GO环境
- 5步轻松搭建ERLANG开发环境
- centos6.5下的go环境搭建
- Go 语言环境搭建
- Go环境搭建
- Go 语言环境搭建
- Go环境的搭建
- go语言环境搭建
- go开发环境搭建
- Go环境搭建
- go环境搭建
- linux go环境搭建
- ubuntu搭建go环境
- linux go环境搭建
- Go环境搭建小记
- go语言环境搭建
- IDEA搭建go环境
- 大型项目使用Automake/Autoconf完成编译配置
- Retrofit2的再封装实战—同步与异步请求
- 人事管理系统实现(二)
- Android 网络框架之Retrofit2使用详解及从源码中解析原理
- 初谈一Java Annotation
- 5步搭建GO环境
- 判断用户是否在线及实现一个账号一个人登陆
- hdu 2048 错排公式 神、上帝以及老天爷
- MFC:超链接文本(重绘CStatic)
- 场效应管
- Java并发容器大合集
- 【java基础 15】java代码中“==”和equals的区别
- 如何学习Storm
- linux中的优先搜索树的实现--prio_tree