升级接口约束
This commit is contained in:
3
yml.go
3
yml.go
@ -40,6 +40,9 @@ func (o *ownYml) MarshalForStringIgnoreError(input any) string {
|
||||
return string(o.MarshalForByteIgnoreError(input))
|
||||
}
|
||||
|
||||
func (o *ownYml) Unmarshal(byteData []byte, receiver any) error {
|
||||
return o.UnmarshalWithNumber(byteData, receiver)
|
||||
}
|
||||
func (o *ownYml) UnmarshalWithNumber(byteData []byte, receiver any) error {
|
||||
return yaml.NewDecoder(bytes.NewReader(byteData)).Decode(receiver)
|
||||
}
|
||||
|
Reference in New Issue
Block a user