GO (待更新)
日期20190531,GO AND TOOLS FOR HOME
0 环境搭建
Install the Go tools If you are upgrading from an older version of Go you must first remove the existing version.
Linux, macOS, and FreeBSD tarballs Download the archive and extract it into /usr/local, creating a Go tree in /usr/local/go. For example: tar -C /usr/local -xzf go1.12.5.linux-amd64.tar.gz (Typically these commands must be run as root or through sudo.) Add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile: export PATH=$PATH:/usr/local/go/bin Note: changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.
Test your installation Check that Go is installed correctly by setting up a workspace and building a simple program, as follows. Create your workspace directory, $HOME/go. (If you'd like to use a different directory, you will need to set the GOPATH environment variable.) Next, make the directory src/hello inside your workspace, and in that directory create a file named hello.go that looks like: package main import "fmt" func main() {
fmt.Printf("hello, world\n")
} Then build it with the go tool: $ cd $HOME/go/src/hello
$ go build The command above will build an executable named hello in the directory alongside your source code. Execute it to see the greeting: $ ./hello
hello, world If you see the "hello, world" message then your Go installation is working. You can run go install to install the binary into your workspace's bin directory or go clean -i to remove it. Before rushing off to write Go code please read the How to Write Go Code document, which describes some essential concepts about using the Go tools.
Installing extra Go versions It may be useful to have multiple Go versions installed on the same machine, for example, to ensure that a package's tests pass on multiple Go versions. Once you have one Go version installed, you can install another (such as 1.10.7) as follows: $ go get golang.org/dl/go1.10.7
$ go1.10.7 download The newly downloaded version can be used like go: $ go1.10.7 version
go version go1.10.7 linux/amd64 All Go versions available via this method are listed on the download page. You can find where each of these extra Go versions is installed by looking at its GOROOT; for example, go1.10.7 env GOROOT. To uninstall a downloaded version, just remove its GOROOT directory and the goX.Y.Z binary.
Uninstalling Go To remove an existing Go installation from your system delete the go directory. This is usually /usr/local/go under Linux, macOS, and FreeBSD or c:\Go under Windows. You should also remove the Go bin directory from your PATH environment variable. Under Linux and FreeBSD you should edit /etc/profile or $HOME/.profile. If you installed Go with the macOS package then you should remove the /etc/paths.d/go file. Windows users should read the section about setting environment variables under Windows.
Go 语言开发工具
LiteIDE 是一款开源、跨平台的轻量级 Go 语言集成开发环境(IDE)。
支持的 操作系统 Windows x86 (-bit or -bit)
Linux x86 (-bit or -bit) 下载地址 :http://sourceforge.net/projects/liteide/files/ 源码地址 :https://github.com/visualfc/liteide
GO (待更新)的更多相关文章
- 【原】Android热更新开源项目Tinker源码解析系列之三:so热更新
本系列将从以下三个方面对Tinker进行源码解析: Android热更新开源项目Tinker源码解析系列之一:Dex热更新 Android热更新开源项目Tinker源码解析系列之二:资源文件热更新 A ...
- 使用TSQL查询和更新 JSON 数据
JSON是一个非常流行的,用于数据交换的文本数据(textual data)格式,主要用于Web和移动应用程序中.JSON 使用“键/值对”(Key:Value pair)存储数据,能够表示嵌套键值对 ...
- 【原】Android热更新开源项目Tinker源码解析系列之一:Dex热更新
[原]Android热更新开源项目Tinker源码解析系列之一:Dex热更新 Tinker是微信的第一个开源项目,主要用于安卓应用bug的热修复和功能的迭代. Tinker github地址:http ...
- 【原】Android热更新开源项目Tinker源码解析系列之二:资源文件热更新
上一篇文章介绍了Dex文件的热更新流程,本文将会分析Tinker中对资源文件的热更新流程. 同Dex,资源文件的热更新同样包括三个部分:资源补丁生成,资源补丁合成及资源补丁加载. 本系列将从以下三个方 ...
- Entity Framework 6 Recipes 2nd Edition 译 -> 目录 -持续更新
因为看了<Entity Framework 6 Recipes 2nd Edition>这本书前面8章的翻译,感谢china_fucan. 从第九章开始,我是边看边译的,没有通读,加之英语 ...
- iOS热更新-8种实现方式
一.JSPatch 热更新时,从服务器拉去js脚本.理论上可以修改和新建所有的模块,但是不建议这样做. 建议 用来做紧急的小需求和 修复严重的线上bug. 二.lua脚本 比如: wax.热更新时,从 ...
- 【.net 深呼吸】程序集的热更新
当一个程序集被加载使用的时候,出于数据的完整性和安全性考虑,程序集文件(在99.9998%的情况下是.dll文件)会被锁定,如果此时你想更新程序集(实际上是替换dll文件),是不可以操作的,这时你得把 ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(1)-前言与目录(持续更新中...)
开发工具:VS2015(2012以上)+SQL2008R2以上数据库 您可以有偿获取一份最新源码联系QQ:729994997 价格 666RMB 升级后界面效果如下: 任务调度系统界面 http: ...
- Power BI官方视频(3) Power BI Desktop 8月份更新功能概述
Power BI Desktop 8月24日发布了更新版本.现将更新内容翻译整理如下,可以根据后面提供的链接下载最新版本使用. 1.主要功能更新 1.1 数据钻取支持在线版 以前的desktop中进行 ...
- 神马玩意,EntityFramework Core 1.1又更新了?走,赶紧去围观
前言 哦,不搞SQL了么,当然会继续,周末会继续更新,估计写完还得几十篇,但是我会坚持把SQL更新完毕,绝不会烂尾,后续很长一段时间没更新的话,不要想我,那说明我是学习新的技能去了,那就是学习英语,本 ...
随机推荐
- beego 如何自定error
beego通过Redirect方法来进行跳转: 1 2 3 func (this *AddController) Get() { this.Redirect("/", 30 ...
- OpenCV-Python画直方图和累积直方图
代码如下: import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread('C:\\Users\\adm ...
- java位运算定义常量
简单说一下位运算 按位与(&) 参加运算的两个数,换算为二进制(0.1)后,进行与运算.只有当相应位上的数都是1时,该位才取1,否则该为为0 按位或(|) 参加运算的两个数,换算为二进制(0. ...
- 【VS开发】浅谈C/C++中的static和extern关键字
一.C语言中的static关键字 在C语言中,static可以用来修饰局部变量,全局变量以及函数.在不同的情况下static的作用不尽相同. (1)修饰局部变量 一般情况下,对于局部变量是存放在栈区的 ...
- pigcms研究
{s:5:"price";s:2:"20";s:3:"num";i:2;s:4:"name";s:21:"紫薯 ...
- nginx 反向代理是url带后缀
1.后端:http://10.253.149.2/tdsqlpcloud/index.php 2.配置文件 danjan01deiMac:nginx danjan01$ cat /usr/local/ ...
- 模仿Spy++抓某窗口消息
核心函数 SetWindowsHookExA API文档:https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-s ...
- Array of Doubled Pairs
Given an array of integers A with even length, return true if and only if it is possible to reorder ...
- Shell脚本编程(一)
shell 脚本编程(一) 1 . shell 的作用 Shell的作用是解释执行用户的命令,用户输入一条命令,Shell就解释执行一条,这种方式称为交互式(Interactive),Shell还有一 ...
- 那些年,我们见过的 Java 服务端乱象
导读 查尔斯·狄更斯在<双城记>中写道:“这是一个最好的时代,也是一个最坏的时代.” 移动互联网的快速发展,出现了许多新机遇,很多创业者伺机而动:随着行业竞争加剧,互联网红利逐渐消失,很多 ...