Skip to content

Commit

Permalink
fix(go-tools): use go install for main packages in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
smoyer64 committed Jul 8, 2021
1 parent 930ee02 commit 00d00de
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
15 changes: 15 additions & 0 deletions install_go_programs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# File: install_go_programs.yml

# - name: debug
# debug:
# var: "packages"

- name: "{{ name }}"
shell:
cmd: "go install {{ item }}"
environment:
GOPATH: "{{ go_tools_directory }}"
with_items: "{{ packages }}"
register: "go_get_result"
changed_when: "'downloading' in go_get_result.stderr"
27 changes: 18 additions & 9 deletions roles/development/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,35 @@
- "go"
- "go-tools"

- include: "../../install_go_programs.yml"
vars:
name: "add useful go programs"
packages:
- "github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest"
- "github.com/golangci/golangci-lint/cmd/golangci-lint@latest"
- "github.com/zimmski/go-mutesting/cmd/go-mutesting@latest"
- "github.com/go-delve/delve/cmd/dlv@latest"
- "google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest"
- "github.com/fullstorydev/grpcurl/cmd/grpcurl@latest"
- "github.com/golang-migrate/migrate/v4/cmd/migrate@latest"
- "github.com/swaggo/swag/cmd/swag@latest"
tags:
- "languages"
- "go"
- "go-tools"

- include: "../../install_go_packages.yml"
vars:
name: "add useful go packages"
packages:
- "github.com/uudashr/gopkgs/cmd/gopkgs"
- "github.com/kisielk/errcheck"
- "github.com/tsliwowicz/go-wrk"
- "github.com/uber/go-torch"
- "github.com/google/pprof"
# - "github.com/golangci/golangci-lint/cmd/[email protected]"
- "github.com/zimmski/go-mutesting/cmd/go-mutesting"
- "golang.org/x/tools/gopls"
- "golang.org/x/tools/godoc"
- "github.com/go-delve/delve/cmd/dlv"
- "github.com/fullstorydev/grpcurl/cmd/grpcurl"
- "github.com/golang/protobuf/protoc-gen-go"
- "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
- "github.com/sonatype-nexus-community/nancy"
- "github.com/golang-migrate/migrate/cmd/migrate"
- "github.com/swaggo/swag/cmd/swag"
tags:
- "languages"
- "go"
Expand All @@ -112,7 +121,7 @@
vars:
name: "install ko for Go-Kubernetes development"
packages:
- "github.com/google/ko/cmd/ko"
- "github.com/google/ko/cmd/ko@latest"
tags:
- containerization
- kubernetes
Expand Down

0 comments on commit 00d00de

Please sign in to comment.