Sunday, June 22, 2025
HomeGolangGetting error whereas constructing docker picture - Getting Assist

Getting error whereas constructing docker picture – Getting Assist


vendor/go.elastic.co/apm/transport/http.go:115:38: undefined: configutil.ParseBoolEnv
vendor/go.elastic.co/apm/transport/http.go:120:35: undefined: configutil.ParseDurationEnv

Im getting this error whereas constructing docker picture however the ParseBoolEnv and ParseDurationEnv perform is within the talked about path inside the seller listing

Hello @Hariprasanth_R, welcome to the discussion board.

go.elastic.co/apm/transport/http.go imports "go.elastic.co/apm/inside/configutil" (see apm-agent-go/transport/http.go at 41de5f09b4be67a9781a9e889a9c249a4c35176d · elastic/apm-agent-go · GitHub).

Does the trail go.elastic.co/apm/inside/configutil exist in your vendor folder?

Does working go mod tidy enhance the scenario?


Background: I obtained curious, so I examined this regionally. I created a go.mod and principal.go (see under), then I ran go mod tidy to obtain all dependencies, then I ran go mod vendor to get all of the dependencies into the vendor listing.

At my finish, I see go.elastic.co/apm/inside/configutil inside my vendor listing, and go construct succeeds.

module vendoring

go 1.20

require go.elastic.co/apm v1.15.0

require github.com/pkg/errors v0.8.1 // oblique
package deal principal

import (
	"log"

	"go.elastic.co/apm/transport"
)

func principal() {
	t, err := transport.NewHTTPTransport()
	if err != nil {
		log.Deadly(err)
	}
	t.SetUserAgent("go.elastic.co/apm/transport")
}

Thanks for the reply.
However I to see go.elastic.co/apm/inside/configutil inside my vendor listing and go mod tidy doesn’t appear to offer any enchancment

That is unusual. Is there one thing particular about your construct surroundings? Some settings, restrictions, and many others. that will not exist on a typical machine?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments