The go-yaml/yaml has already renamed it’s import path from "github.com/go-yaml/yaml" to "gopkg.in/yaml.v2".
As README of go-yaml/yaml v2.1.0 said, downstream repos should use "gopkg.in/yaml.v2" to get or import go-yaml/yaml.
Example
Some more examples can be found in the "examples" folder.
package main
import (
"fmt"
"log"
"gopkg.in/yaml.v2"
)
…
When you use the old path "github.com/go-yaml/yaml" to import the go-yaml/yaml, it will be very easy to reintroduce go-yaml/yaml through the import statements "import gopkg.in/yaml.v2" in the go source file of go-yaml/yaml.
https://github.com/go-yaml/yaml/blob/v2.1.0/decode_test.go#L12
The "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.
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
ghaoo/rboot
still used the old path: https://github.com/ghaoo/rboot/blob/master/go.mod#L11When 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/ghaoo/rboot/search?q=github.com%2Fgo-yaml%2Fyaml&unscoped_q=github.com%2Fgo-yaml%2Fyaml