Remove 01.2.md spaces

This commit is contained in:
vCaesar
2017-06-10 11:31:53 +08:00
parent c477f424f8
commit c1e04e08b5
2 changed files with 31 additions and 33 deletions

View File

@@ -18,7 +18,7 @@ export GOPATH=/home/apple/mygo
Windows 设置如下新建一个环境变量名称叫做GOPATH
```sh
GOPATH=c:\mygo
GOPATH=c:\mygo
```
GOPATH允许多个目录当有多个目录时请注意分隔符多个目录的时候Windows是分号Linux系统是冒号当有多个GOPATH时默认会将go get的内容放在第一个目录下。

View File

@@ -121,12 +121,12 @@
适用于 Sublime Text 3
```Go
import urllib.request,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler()));open(os.path.join(ipp,pf),'wb').write(urllib.request.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
import urllib.request,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler()));open(os.path.join(ipp,pf),'wb').write(urllib.request.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
```
适用于 Sublime Text 2
```Go
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp)ifnotos.path.exists(ipp)elseNone;urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()));open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read());print('Please restart Sublime Text to finish installation')
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp)ifnotos.path.exists(ipp)elseNone;urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()));open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read());print('Please restart Sublime Text to finish installation')
```
这个时候重启一下Sublime可以发现在在菜单栏多了一个如下的栏目说明Package Control已经安装成功了。
@@ -157,10 +157,10 @@
先在sublime安装gotests插件,再运行:
```Go
go get -u -v github.com/cweill/gotests/...
```
```Go
go get -u -v github.com/cweill/gotests/...
```
3. 验证是否安装成功你可以打开Sublime打开main.go看看语法是不是高亮了输入`import`是不是自动化提示了,`import "fmt"`之后,输入`fmt.`是不是自动化提示有函数了。
@@ -220,33 +220,31 @@ vscode代码设置可用于Go扩展。这些都可以在用户的喜好来设置
接着安装依赖包支持(网络不稳定,请直接到Github[Golang](https://github.com/golang)下载再移动到相关目录):
```Go
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/zmb3/gogetdoc
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/zmb3/gogetdoc
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
```
vscode还有一项很强大的功能就是断点调试,结合[delve](https://github.com/derekparker/delve)可以很好的进行Go代码调试
```Go
go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv
go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv
brew install go-delve/delve/delve(mac可选)
brew install go-delve/delve/delve(mac可选)
```
如果有问题再来一遍:
```Go
go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv
go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv
```
注意:修改"dlv-cert"证书, 选择"显示简介"->"信任"->"代码签名" 修改为: 始终信任
@@ -285,13 +283,13 @@ Atom是Github基于Electron和web技术构建的开源编辑器, 是一款很漂
它需要依赖下面的go语言工具:
```Go
1.autocomplete-go gocode的代码自动提示
2.gofmt 使用goftm,goimports,goturns
3.builder-go:go-install 和go-test,验证代码,给出建议
4.gometalinet-linter:goline,vet,gotype的检查
5.navigator-godef:godef
6.tester-goo :go test
7.gorename :rename
1.autocomplete-go gocode的代码自动提示
2.gofmt 使用goftm,goimports,goturns
3.builder-go:go-install 和go-test,验证代码,给出建议
4.gometalinet-linter:goline,vet,gotype的检查
5.navigator-godef:godef
6.tester-goo :go test
7.gorename :rename
```
在Atom中的 Preference 中可以找到install菜单,输入 go-plus,然后点击安装(install)