Closed tobischo closed 9 months ago
It may be built with old version, using old std lib
go version $(which gci)
try recompile it
go version go1.22.0 linux/amd64
It was already compiled with go1.22.0. I had updated to the latest version to make sure that it wasn't that after I was already on go1.22.0.
I can't reproduce, even if I set module and toolchain to the previous version
➜ foo go run github.com/daixiang0/gci@latest write --custom-order -s=standard -s="Prefix(some.specific.domain.com/prefix)" -s=default --skip-generated --skip-vendor .
➜ foo cat main.go
package main
import (
"database/sql"
"math/rand/v2"
"testing"
"time"
_ "github.com/lib/pq"
)
func main() {}
➜ foo cat go.mod
module foo.bar/baz
go 1.21
toolchain go1.21
require github.com/lib/pq v1.10.9
I completely removed gci and re-installed it. Re-opened all shells etc to make sure that it should be in a close to fresh environment with go 1.22.
I cannot recreate it anymore either. So you might have been correct that it must still have been something somehow running against 1.21.
Closing this.
Thank you for checking and sorry for the additional work
What version of GCI are you using?
Reproduce Steps
gci write --custom-order -s=standard -s="Prefix(some.specific.domain.com/prefix)" -s=default --skip-generated --skip-vendor .
What did you expect to see?
I expected
math/rand/v2
to be listed with the standard library packages and not with the other packages.What did you see instead?