robfig / glock

MIT License
230 stars 27 forks source link

Support major module version paths in imports during save #47

Closed atavakoliyext closed 4 years ago

atavakoliyext commented 4 years ago

When an import that contains a (possible) major module version fails, it is reattempted without the version component.

For example, imports like "sigs.k8s.io/structured-merge-diff/v4/value" and "k8s.io/klog/v2" will fail because on disk, they reside in GOPATH/src/sigs.k8s.io/structured-merge-diff/value & GOPATH/src/k8s.io/klog, respectively.