-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(encoding): experimental yaml v3 library support
- Loading branch information
1 parent
9934fe7
commit ea18671
Showing
5 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build !viper_yaml3 | ||
// +build !viper_yaml3 | ||
|
||
package yaml | ||
|
||
import yamlv2 "gopkg.in/yaml.v2" | ||
|
||
var yaml = struct { | ||
Marshal func(in interface{}) (out []byte, err error) | ||
Unmarshal func(in []byte, out interface{}) (err error) | ||
}{ | ||
Marshal: yamlv2.Marshal, | ||
Unmarshal: yamlv2.Unmarshal, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build viper_yaml3 | ||
// +build viper_yaml3 | ||
|
||
package yaml | ||
|
||
import yamlv3 "gopkg.in/yaml.v3" | ||
|
||
var yaml = struct { | ||
Marshal func(in interface{}) (out []byte, err error) | ||
Unmarshal func(in []byte, out interface{}) (err error) | ||
}{ | ||
Marshal: yamlv3.Marshal, | ||
Unmarshal: yamlv3.Unmarshal, | ||
} |