zq2599/blog_demos

执行code-generator时,generating clientset出错

Opened this issue · 0 comments

./src/k8s.io/code-generator/generate-groups.sh all 8s_customize_controller/pkg/client k8s_customize_controller/pkg/apis bolingcavalry:v1
Generating deepcopy funcs
Generating clientset for bolingcavalry:v1 at 8s_customize_controller/pkg/client/clientset
panic: runtime error: index out of range [1] with length 0

goroutine 48 [running]:
golang.org/x/tools/internal/imports.(*ModuleResolver).scanDirForPackage(0xc0066b16e0, 0xc0066a1ff0, 0x10, 0x4, 0xc006a748a0, 0x26, 0x0, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/imports/mod.go:346 +0x990
golang.org/x/tools/internal/imports.(*ModuleResolver).scan.func1(0xc0066a1ff0, 0x10, 0x4, 0xc006a748a0, 0x26)
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/imports/mod.go:263 +0x73e
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc0066b7f40, 0xc006a748a0, 0x2f, 0x0, 0xc006a748a0, 0x2f)
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/gopathwalk/walk.go:175 +0xf3
golang.org/x/tools/internal/fastwalk.(*walker).onDirEnt(0xc0067df4d0, 0xc006829f50, 0x26, 0xc006a52e60, 0x8, 0x0, 0x0, 0x0)
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/fastwalk/fastwalk.go:168 +0xbb
golang.org/x/tools/internal/fastwalk.readDir(0xc006829f50, 0x26, 0xc006719e50, 0x0, 0x0)
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/fastwalk/fastwalk_unix.go:68 +0x228
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0067df4d0, 0xc006829f50, 0x26, 0x1, 0x1, 0x0)
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0067df4d0, 0xc006856040)
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/fastwalk/fastwalk.go:134 +0x175
created by golang.org/x/tools/internal/fastwalk.Walk
/root/go/pkg/mod/golang.org/x/tools@v0.0.0-20190821162956-65e3620a7ae7/internal/fastwalk/fastwalk.go:81 +0x248