Closed KateGo520 closed 4 years ago
@balintTobik @eMGabriel Could you help me review this issue? Thx :p
@KateGo520 Sorry for the slow response. Thank you for highlighting the deprecated import. It will be fixed in PR #52
@eMGabriel Thanks for your efforts and feedback.
Background
The
go-yaml/yaml
has already renamed it’s import path from "github.com/go-yaml/yaml" to "gopkg.in/yaml.v2". As README ofgo-yaml/yaml
v2.1.0 said, downstream repos should use "gopkg.in/yaml.v2" to get or importgo-yaml/yaml
.But
nokia/CPU-Pooler
still used the old path: https://github.com/nokia/CPU-Pooler/blob/master/go.mod#L7When you use the old path "github.com/go-yaml/yaml" to import the
go-yaml/yaml
, it will be very easy to reintroducego-yaml/yaml
through the import statements "import gopkg.in/yaml.v2" in the go source file ofgo-yaml/yaml
. https://github.com/go-yaml/yaml/blob/v2.1.0/decode_test.go#L12The "gopkg.in/yaml.v2" and "github.com/go-yaml/yaml" are the same repos. This will work in isolation, bring about potential risks and problems. So, why not get rid of the old import path "github.com/go-yaml/yaml", use "gopkg.in/yaml.v2" instead.
Solution
Replace all the old import paths, change
"github.com/go-yaml/yaml"
to"gopkg.in/yaml.v2"
. Where did you import it: https://github.com/nokia/CPU-Pooler/search?q=github.com%2Fgo-yaml%2Fyaml&unscoped_q=github.com%2Fgo-yaml%2Fyaml