Skip to content

Commit

Permalink
Fix goland path
Browse files Browse the repository at this point in the history
Add GOPATH into bashrc and zshrc
  • Loading branch information
conradhodge committed Jan 7, 2024
1 parent 9991861 commit 7eaaba9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions ansible/roles/wsl/tasks/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,27 @@
ansible.builtin.apt:
name: golang-go
state: latest

- name: Add GOPATH in bashrc
lineinfile:
path: "$HOME/.bashrc"
line: 'export GOPATH=$HOME/go'
state: present

- name: Update PATH with GOPATH in bashrc
lineinfile:
path: "$HOME/.bashrc"
line: 'export PATH="${GOPATH}/bin:${PATH}"'
state: present

- name: Add GOPATH in zshrc
lineinfile:
path: "$HOME/.zshrc"
line: 'export GOPATH=$HOME/go'
state: present

- name: Update PATH with GOPATH in zshrc
lineinfile:
path: "$HOME/.zshrc"
line: 'export PATH="${GOPATH}/bin:${PATH}"'
state: present

0 comments on commit 7eaaba9

Please sign in to comment.