Chore: support MarshalYAML to some config filed (#581)

This commit is contained in:
Kaming Chan
2020-03-15 19:40:39 +08:00
committed by GitHub
parent 9471d80785
commit 082847b403
3 changed files with 12 additions and 3 deletions

View File

@ -55,6 +55,11 @@ func (l LogLevel) MarshalJSON() ([]byte, error) {
return json.Marshal(l.String())
}
// MarshalYAML serialize LogLevel with yaml
func (l LogLevel) MarshalYAML() (interface{}, error) {
return l.String(), nil
}
func (l LogLevel) String() string {
switch l {
case INFO: