echo $GOPATH will print:
There are 2 directories, I want to append the first directory's sub-directory
If I write
$PATH=$PATH:$GOPATH/bin, then actually it appends 2 directories to
This only contains directories, it should be
This actually shouldn't be added to
BTW, there are cases that
$GOPATH only contains one directory, so that simply appending
$GOPATH/bin will work.
I am looking for a solution that fits both cases. So, how do I write this in a bash config file?