Golang 1.13
使用vim-go
- vim-go 需要Vim 7.4.2009, 默認的centos7 上 yum 安裝的是7.4.1006, 所以先升級
[@sjs_19_176 ~]# yum install -y gcc gcc-c++ ruby ruby-devel lua lua-devel \
ctags git python python-devel \
tcl-devel ncurses-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed
[@sjs_19_176 ~]# wget https://github.com/vim/vim/archive/v7.4.2367.tar.gz ; tar -zxf v7.4.2367.tar.gz; cd vim-7.4.2367
[@sjs_19_176 vim-7.4.2367]# ./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-pythoninterp=yes --with-python-config-dir=/usr/lib64/python2.7/config --enable-perlinterp=yes --enable-luainterp=yes --enable-cscope --prefix=/usr/local
不翻牆使用go mod
[@sjs_19_176 ~]$ # go env -w GOPROXY=https://goproxy.io,direct
[@sjs_19_176 ~]$ go env -w GOPROXY=https://goproxy.cn,direct
[@sjs_19_176 ~]$ go env -w GOPRIVATE=git.sogou-inc.com
Makefile
PROJECT_BIN := demo
all: test build
@echo ">>>>>> building done!"
test:
go test -v -cover ./...
build:
go build -ldflags "-s -w" -o $(PROJECT_BIN) main.go