gopath Questions
4
Solved
Before it happened, what I am doing is trying to use the dep to manage my golang code dependency.
What I found right now is I cannot do any command with go, even if I try to uninstall it with brew ...
Aguila asked 26/2, 2020 at 4:23
8
Small part of error I'm getting after trying to run go build command
go build ./...
trillian.pb.go:7:8: cannot find package "github.com/golang/protobuf/proto" in any of:
/usr/local/go/src/github....
2
I have a ~/.config/fish/config.fish which contains the following lines:
set PATH $PATH (go env GOPATH)/bin
set -x GOPATH (go env GOPATH)
If I simply run go env GOPATH at the command line, I get ...
25
Solved
I'm trying to install doozer like this:
$ goinstall github.com/ha/doozer
I get these errors.
goinstall: os: go/build: package could not be found locally
goinstall: fmt: go/build: package coul...
2
Solved
I have the following project structure, outside of GOPATH.
. // Project root
├── Dockerfile
├── .env
├── README.md
└── src
├── main.go
├── go.mod
├── go.sum
├── internal
│ ├── somepackage
│...
4
I installed Golang and faced with go.mod file not found in current directory or any parent directory error at very first time.
But I'm working on <GOPATH>/src directory. Isn't go.mod only req...
Cozza asked 11/6, 2021 at 0:21
7
Solved
I'm unable to run go get git@github<user/repo> in my $GOPATH folder.
Getting this error:
go: cannot use path@version syntax in GOPATH mode
I just want to understand why go get isn't work...
5
I have some confusion regarding Golang directory structure.
Base on the book The Way to Go by Ivo Balbaert, project code should be placed into src, and recommends the following directory structure....
1
Solved
I need to remove absolute path in the trace, that corresponds to the imported module. Even though I compile my program so: go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH I still ge...
3
coming from a java and grails background, (and having written millions of lines of C 30 years ago), I cant see how go can be usable with a fixed gopath on windows.
installing go creates this struc...
1
Solved
So I've been scratching my head at this for a couple weeks now, and after reading several source on how $ go build works and its three magic directories, /bin, /pkg, /src, it's still not very clear...
Rudnick asked 30/11, 2018 at 17:20
1
Solved
Simple Go project, with a external dependence:
import (
"fmt"
"html"
"log"
"net/http"
"github.com/gorilla/mux"
)
My path working fine for other tasks like run, build, etc.:
GOPATH="/h...
1
Solved
I'm a new golang developer and I wonder why $GOPATH environment variable is needed to be set at the root of my project.
If I'm working on several projects at the same time, I need to each time re-...
1
© 2022 - 2024 — McMap. All rights reserved.