mirror of
				https://github.com/cheat/cheat.git
				synced 2025-11-04 07:45:28 +01:00 
			
		
		
		
	Use yaml.v3 rather than .v2 and .v1
This commit is contained in:
		
				
					committed by
					
						
						Christopher Allen Lane
					
				
			
			
				
	
			
			
			
						parent
						
							242da8c89a
						
					
				
				
					commit
					6bf51e758f
				
			@@ -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)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ import (
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"gopkg.in/yaml.v2"
 | 
			
		||||
	"gopkg.in/yaml.v3"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Parse parses cheatsheet frontmatter
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user