Skip to content

Move package to go modules#45

Open
timohahaa wants to merge 1 commit intodjimenez:masterfrom
timohahaa:feat/use-go-modules
Open

Move package to go modules#45
timohahaa wants to merge 1 commit intodjimenez:masterfrom
timohahaa:feat/use-go-modules

Conversation

@timohahaa
Copy link
Copy Markdown

Basically this package is very old (but still very useful!), and it doesn't use go-modules (a standard way that go manages dependencies nowadays). This can cause other go-programs, that use this package, to fail on compile time:

make build
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o .build/api ./cmd/api
# github.com/djimenez/iconv-go
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/reader.go:10:21: undefined: Converter
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/reader.go:18:20: undefined: NewConverter
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/reader.go:28:58: undefined: Converter
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/writer.go:7:21: undefined: Converter
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/writer.go:15:20: undefined: NewConverter
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/writer.go:25:63: undefined: Converter
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/iconv.go:11:20: undefined: NewConverter
../../../go/pkg/mod/github.com/djimenez/iconv-go@v0.0.0-20160305225143-8960e66bd3da/iconv.go:37:20: undefined: NewConverter
make: *** [Makefile:17: build] Error 1

The error persists even if using vendor directory. I just added a go.mod file and fixed go version at 1.24.0 (currently the most up-to-date one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant