-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathinstall_gotools.sh
executable file
·59 lines (53 loc) · 1.6 KB
/
install_gotools.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
IFS=$'\n\t'
set -xeou pipefail
GOCLONE="/Users/$USER/workspace/goclone/goclone"
if [[ -L /usr/local/bin/goclone ]]; then
if [[ "$(readlink -f /usr/local/bin/goclone)" != "$GOCLONE" ]]; then
sudo unlink /usr/local/bin/goclone
sudo ln -s "$GOCLONE" /usr/local/bin/goclone
fi
fi
GOTOOLS=~/gotools
mkdir -p "$GOTOOLS"
GOPKGS=(
# vscode-go tools
# from https://github.com/Microsoft/vscode-go/blob/master/src/goInstallTools.ts
github.com/acroca/go-symbols \
github.com/alecthomas/gometalinter \
github.com/cweill/gotests/... \
github.com/derekparker/delve/cmd/dlv \
github.com/fatih/gomodifytags \
github.com/golang/lint/golint \
github.com/haya14busa/goplay/cmd/goplay \
github.com/josharian/impl \
github.com/nsf/gocode \
github.com/ramya-rao-a/go-outline \
github.com/rogpeppe/godef \
github.com/sourcegraph/go-langserver \
github.com/tylerb/gotype-live \
github.com/uudashr/gopkgs/cmd/gopkgs \
github.com/zmb3/gogetdoc \
golang.org/x/tools/cmd/godoc \
golang.org/x/tools/cmd/goimports \
golang.org/x/tools/cmd/gorename \
golang.org/x/tools/cmd/guru \
honnef.co/go/tools/... \
sourcegraph.com/sqs/goreturns \
github.com/davidrjenni/reftools/cmd/fillstruct \
# other go dev
github.com/kardianos/govendor \
github.com/tools/godep \
github.com/Masterminds/glide \
github.com/golang/dep/cmd/dep \
github.com/golang/protobuf/protoc-gen-go \
github.com/spf13/cobra/cobra \
github.com/ahmetb/govvv \
# misc
github.com/shurcooL/markdownfmt \
github.com/cpuguy83/go-md2man \
golang.org/x/vgo \
github.com/rakyll/hey \
github.com/ahmetb/iamutil
)
GOPATH="$GOTOOLS" go get -u "${GOPKGS[@]}"