Chore: support MarshalYAML to some config filed (#581)
This commit is contained in:
@ -51,6 +51,11 @@ func (m TunnelMode) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(m.String())
|
||||
}
|
||||
|
||||
// MarshalYAML serialize TunnelMode with yaml
|
||||
func (m TunnelMode) MarshalYAML() (interface{}, error) {
|
||||
return m.String(), nil
|
||||
}
|
||||
|
||||
func (m TunnelMode) String() string {
|
||||
switch m {
|
||||
case Global:
|
||||
|
Reference in New Issue
Block a user