Questions tagged [glide-golang]

Glide is obsolete, use Go Modules instead! Glide is a package manager for Go that is conceptually similar to package managers for other languages such as Cargo for Rust, NPM for Node.js, Pip for Python, Bundler for Ruby, and so forth.

!! Don't use Glide !!

Glide has been obsoleted by Go Modules for many years now. Use Go Modules instead.

Homepage

Github

Documentation

132 questions
2
votes
3 answers

can't find struct in a same package

suddenly, vscode cannot get access struct in the same package,but different files. the error showed undefined struct Previously vscode was able to instantiate struct across files(vscode+go1.12.4) the sample code like this: file1 a.go package…
Cosmo
  • 39
  • 4
2
votes
1 answer

Glide or dep dependencies issue, dependencies in vendor are not flat

Related code is as follow: import ( core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/legacyscheme" ) ... func PodExec(clusterId string, namespace string, podName string, containerName…
AndyChow
  • 103
  • 10
2
votes
1 answer

Why is a go application binary different sizes when building using dependencies in a vendor directory vs dependencies in gopath?

I have a main.go file with a glide.yaml file (see below for source code) in a clean gopath (No other repositories) Running go get -u ./... then go build main.go generates a binary of size 2377872 bytes. Cleaning the gopath of any repos that were…
chuy
  • 23
  • 5
2
votes
1 answer

How can i print Unmarshalled data in golang?

I am reading json from Raabbitmq in golang and mapping the json in an interface My struct looks like this, and type Documents struct { user_id string partner_id []string last_login int } and I am mapping the incoming json in the…
Gaurav Garg
  • 137
  • 1
  • 9
2
votes
1 answer

Golang 1.8 glide vendor folder ignoring

I'm working in Go version 1.8, Glide for package dependency and my project structure is /Users/myName/go bin/ pkg/ src/ main.go vendor/ github.com/ gaoling.org/ all my packages are installed in…
Harish
  • 141
  • 2
  • 14
1
vote
0 answers

I want to add git credentials in jenkins pipeline, which take a file from particular branch and add to our current jenkins pipeline

I have the pl and pl_client git repository as a private in that two repository i am using the go language and in pl_client i am just installing the dependencies with the command go get all for that dependencies it asking the access for the pl git…
1
vote
1 answer

How can I set semantic versioning for a Go project and what are commands to set the version?

How can I set semantic versioning for Go project and what are commands to set the version?
Mayur Kadam
  • 149
  • 1
  • 1
  • 4
1
vote
1 answer

Unable to save the data in two different table in golang using gorm

This is my code I'm not sure what went wrong the value which is in the user is getting updated in the user table properly but the address struct value is not storing the data in the address table I want to save two users and address table with one…
Yogi
  • 21
  • 3
1
vote
1 answer

multi indices Elasticsearch query in golang

Hy, I am facing problem during creation of search query for multi indices in Elasticsearch. I have two indices one is "files" having field "filename" and other indices is "message" having field "messageid".I want to get result base on both indices…
1
vote
1 answer

Go fyne, How to resize the Text Canvas?

I am writing a Viewdata Client in Go using the using fyne cross platform toolkit that has a display of 40 cols by 24 rows. With Viewdata block graphics each character needs to be sitting next to its neighbours with no gaps so I am using a custom…
John Newcombe
  • 364
  • 2
  • 7
1
vote
1 answer

Getting error while fetching certificate from windows certificate store in Golang using `certtostore`?

I want to use certificate bundle from windows certificate store, can anyone please tell me what wrong I am doing here? My Code: package main import ( "fmt" "runtime" "github.com/google/certtostore" ) type certmgr struct { …
1
vote
1 answer

GO LANG Libs in usr/local/go or home/username/go?

I'm Ubuntu 21.04 user and I'm trying to use "github.com/golang/protobuf/protoc-gen-go/grpc" lib and I'm confused if my $GOPATH should be GOPATH=$HOME/go or GOPATH=usr/local/go. Because I installed my grpc into GOPATH=$HOME/go, but VSCODE could not…
1
vote
1 answer

Executable file not found in %PATH% golang

package main import ( "bytes" "fmt" //"log" "os/exec" ) func main() { cmd := exec.Command("dir") var stdout, stderr bytes.Buffer cmd.Stdout = &stdout cmd.Stderr = &stderr err := cmd.Run() if err != nil { …
1
vote
1 answer

How to insert package.txt into scripts object of package.json file?

My package.txt contains:- "scripts": { "lint": "eslint --fix .", "lint-check": "eslint .", } I am creating a react app using npx create-react-app --template typescript . Once my React app is created under the project…
1
vote
0 answers

how to bulk insert in mongodb using golang

Node js example: const bulk = db.items.initializeUnorderedBulkOp(); bulk.find( { status: "D" } ).update( { $set: { status: "I", points: "0" } } ); bulk.find( { item: null } ).update( { $set: { item: "TBD" } } ); bulk.execute(); How to implement…
Vikram Biwal
  • 2,618
  • 1
  • 25
  • 36
1
2
3
8 9