mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-22 20:02:11 +00:00
switch to new location of goyaml
This commit is contained in:
parent
002a5b6756
commit
634d7b2638
1 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
"launchpad.net/goyaml"
|
"gopkg.in/yaml.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FrontmatterType struct {
|
type FrontmatterType struct {
|
||||||
|
@ -38,7 +38,7 @@ func InterfaceToConfig(in interface{}, mark rune) ([]byte, error) {
|
||||||
|
|
||||||
switch mark {
|
switch mark {
|
||||||
case rune(YAML_LEAD[0]):
|
case rune(YAML_LEAD[0]):
|
||||||
by, err := goyaml.Marshal(in)
|
by, err := yaml.Marshal(in)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ func InterfaceToFrontMatter(in interface{}, mark rune) ([]byte, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
by, err := goyaml.Marshal(in)
|
by, err := yaml.Marshal(in)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ func removeTomlIdentifier(datum []byte) []byte {
|
||||||
|
|
||||||
func HandleYamlMetaData(datum []byte) (interface{}, error) {
|
func HandleYamlMetaData(datum []byte) (interface{}, error) {
|
||||||
m := map[string]interface{}{}
|
m := map[string]interface{}{}
|
||||||
if err := goyaml.Unmarshal(datum, &m); err != nil {
|
if err := yaml.Unmarshal(datum, &m); err != nil {
|
||||||
return m, err
|
return m, err
|
||||||
}
|
}
|
||||||
return m, nil
|
return m, nil
|
||||||
|
|
Loading…
Reference in a new issue