升级接口约束

This commit is contained in:
2025-05-04 13:59:08 +08:00
parent 0c3d7b7e92
commit 8d68e6106e
7 changed files with 22 additions and 4 deletions

3
yml.go
View File

@ -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)
}