Skip to content

Commit

Permalink
Support go.mod files and fix GOPATH matching (spaceship-prompt#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
Runrioter authored and salmanulfarzy committed Nov 16, 2018
1 parent 7ded806 commit 7e36e7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sections/golang.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ spaceship_golang() {
[[ $SPACESHIP_GOLANG_SHOW == false ]] && return

# If there are Go-specific files in current directory, or current directory is under the GOPATH
[[ -d Godeps || -f glide.yaml || -n *.go(#qN^/) || -f Gopkg.yml || -f Gopkg.lock || ( $GOPATH && $PWD =~ $GOPATH ) ]] || return
[[ -f go.mod || -d Godeps || -f glide.yaml || -n *.go(#qN^/) || -f Gopkg.yml || -f Gopkg.lock \
|| ( $GOPATH && "$PWD/" =~ "$GOPATH/" ) ]] || return

spaceship::exists go || return

Expand Down

0 comments on commit 7e36e7f

Please sign in to comment.