Use yaml.v3 rather than .v2 and .v1

This commit is contained in:
Mikel Olasagasti Uranga
2022-09-05 12:37:43 +02:00
committed by Christopher Allen Lane
parent 242da8c89a
commit 6bf51e758f
25 changed files with 2547 additions and 1084 deletions

View File

@ -10,7 +10,7 @@ import (
cp "github.com/cheat/cheat/internal/cheatpath"
"github.com/mitchellh/go-homedir"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)
// Config encapsulates configuration parameters
@ -40,7 +40,7 @@ func New(_ map[string]interface{}, confPath string, resolve bool) (Config, error
conf.Path = confPath
// unmarshal the yaml
err = yaml.UnmarshalStrict(buf, &conf)
err = yaml.Unmarshal(buf, &conf)
if err != nil {
return Config{}, fmt.Errorf("could not unmarshal yaml: %v", err)
}

View File

@ -5,7 +5,7 @@ import (
"runtime"
"strings"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)
// Parse parses cheatsheet frontmatter