660 questions
Tooling
0
votes
1
replies
35
views
Matching compression libraries between GO and NPM
For context:
I have 2 projects of next.js and go respectively, previously I had a logic to compress some data in next.js backend (getServerSideProps) then send this data to next.js client side and ...
1
vote
2
answers
98
views
Installing go module from private repository leads to strange error
I'm new to Golang and go modules. I was trying to get module from private repository:
go get -v gitlab.project.tech/global/back/common/[email protected]
And I got this message:
get "gitlab.project....
3
votes
1
answer
279
views
Dependabot vendor configuration for `gomod` package-ecosystem
I am referring the optional references that I can specify in my dependabot.yaml file from Optional reference for dependabot
As per the documentation, it is said that I can enable vendor for package-...
-3
votes
1
answer
2k
views
Golang no packages found for open file sodium
I'm trying to use sodium library in golang, module github.com/jamesruan/sodium.
After imported it I added it to go.work file, otherwise nothing works and I really can't understand why.
go.work:
go 1....
-3
votes
1
answer
469
views
Checksum mismatch error when building with golang.org/x/[email protected]
I have a go project, and when I do go build I get the following checksum error from the Golang crypto package:
% go build cmd/myproject/main.go
go: downloading github.com/golang-jwt/jwt v4.5.1+...
0
votes
1
answer
2k
views
go get is always returning: no matching versions for query "upgrade"
This started after I consolidated several repositories and go packages into one repository and package.
Here is the message:
go: github.com/sty-holdings/sharedServices/2024: no matching versions for ...
1
vote
1
answer
615
views
BzlMod + Golang = missing package and incorrect function
Trying to move my messy golang libraries over to bzlmod I found the rules_go reference, but was having trouble with external dependencies (I'd never used go.mod before and so prior stuff was messy).
...
-2
votes
1
answer
99
views
Cannot Import Function in Module with Golang workspace [closed]
What I need
I can write almost all the functions in the module I created, except the one thing I need most is undefined... I really need to use this function
Directory and files
Directory Hierarchy
...
0
votes
1
answer
92
views
Dependency on a unpublished package for a "go:generate" instruction get removed by `go generate ./...` and `go mod tidy` [duplicate]
I'm facing an issue with an import required for a go:generate instruction from another module that doesn't have a published version yet. The dependency is considered indirect and is removed by go mod ...
0
votes
3
answers
85
views
Same struct in two different packages Golang
I have this piece of code:
import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-protos-go/common"
"github.com/hyperledger/fabric-protos-go/...
2
votes
1
answer
306
views
GoLand project in a submodule directory can't find `go.mod` file in parent directory. Can a submodule GoLand project integrate with rest of module?
I have a small monorepo of Go code (as well as node/js/ts/vue/etc for frontend applications, but that should be irrelevant). There is a single go.mod in the repo root directory. I'm trying to create ...
2
votes
1
answer
150
views
Use private go module with gitlab ci Auto-DevOps for auto test
I use gitlab auto dev ops to deploy my project. I have a problem with auto tests(https://docs.gitlab.com/ee/topics/autodevops/stages.html#auto-test). In my project I use a go private module.
The error ...
2
votes
1
answer
350
views
How to publish a Go package/module without publishing a git repo?
I want to publish a collection of go packages as 'my.domain.tld/something'
Can I do it without running a git server on my domain? For example, can I just publish zip files and metadata at the domain ...
2
votes
1
answer
55
views
go mod conflict with v2 pre-release
I am developing version 2 of my hap package, which is a HTTP API framework. Version 2 is not ready yet, and the latest release ls v2.0.0-alpha.2, like so:
* 9319436 - bug fix, refined action error ...
0
votes
0
answers
158
views
Obtaining minimum required go version of remote go module
Is there a way to obtain minimum required go version of remote go module?
I ran into a problem when updated all required modules to latest version that some of modules requires upper go version than ...
4
votes
0
answers
125
views
Error 'Cannot resolve directory' with personal public repository
I cloned the repository to a new computer. But there was such a problem: Cannot resolve directory 'my-repo'
import (
"github.com/my-git/my-repo/internal/handlers"
"github.com/my-git/...
1
vote
0
answers
32
views
exported identifier propagation when writing Go in Visual Studio Go with go.mod replace
When editing multiple Go modules in Visual studio Code and using replace in go.mod to reference other modules via the instantly updating file system instead of using the outdated published package ...
0
votes
0
answers
39
views
How am I supposed to install mockgen when I am using vendoring? [duplicate]
I have a project that is using vendoring.
I need to run mockgen. But I can't use my local install because of the vendoring. Fair enough, I would like to package mockgen into vendor.
However the usual
...
1
vote
1
answer
222
views
GOINSECURE not working, it still use https, after go mod download,it report: parse https://code.demo.org/at?go-get=1: no go-import meta tags
I have a go modgitlab.org/at, place at my private gitlab code.demo.org/at,which use HTTP protocol
My GOENV(go env):
GOVERSION="go1.19.13"
GOPRIVATE="code.demo.org"
GOINSECURE="...
2
votes
0
answers
245
views
Unable to deploy golang API to AWS Elasticbeanstalk
I'm trying to deploy my Golang API to Elasticbeanstalk, without success.
First, I used platform Go, also tred with Docker but it won't work
Go
It just says this in /var/log/eb-engine.log:
2023/11/06 ...
-1
votes
1
answer
4k
views
How do I fix Golang package issues?
I'm starting a Golang course and I'm super new to developing, but having issues with packages. Currently on a lecture about Variables when I go to run the code it gives me
package variables is not in ...
1
vote
1
answer
2k
views
How do I make golang project module accessible to another project pipeline on gitlab?
I have built 2 projects on my local machine. One called middleware and another called authentication.
both have modules. module for middleware project is called gitlab.com/nrs16/util, and module for ...
19
votes
1
answer
29k
views
"go mod tidy" will auto upgrade go version in go.mod?
Previously the project was using go 1.20 in go.mod. I've upgrade my go version to 1.21.0 on local linux machine.
When I run go mod tidy for the project, it upgraded go.mod to use go 1.21.0 ...
1
vote
1
answer
5k
views
go mod tidy stuck with no error or timeout while resolving private dependency
Go Version
go version go1.18.2 windows/amd64
GO ENV
go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\XX\AppData\Local\go-build
set GOENV=C:\Users\XX\AppData\Roaming\go\env
...
5
votes
1
answer
2k
views
Replacing Go dependency with fork: "... used for two different module paths"
I have a very large Go project that depends on github.com/golang/mock. Unfortunately, this package is no longer maintained, and the developers have directed people to use the fork at go.uber.org/mock. ...