Coder Social home page Coder Social logo

Comments (2)

PSalant726 avatar PSalant726 commented on August 13, 2024 3

@AtharvaThorve The go env GOPATH variable is set when the language is installed, but $GOPATH is not. If you want to install global package binaries, you need to set $GOPATH and add $GOPATH/bin to your $PATH in your .zhsrc file. Then, you can go get {{ some package }} outside of a module directory, and you'll be able to run the binary globally.

from fresh.

Uttammgr avatar Uttammgr commented on August 13, 2024 1

@AtharvaThorve i had similar issue but i'm one mac, the way i solved it by fixing path

  • first i made seperate folder for getting folder for go get library so i named golib
  • then set it to go path where following should resemble

refer to following example

go_sandbox
├── bin
├── pkg
└── src
    └── github.com
        └── Uttammgr
  • i think you can do similar by adding following after setting up properly
export GOPATH="$HOME/golib"
export PATH="$PATH:$GOPATH/bin"
export GOPATH="$GOPATH:$HOME/Documents/code_sandbox/go_sandbox"

from fresh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.