feat: add func

This commit is contained in:
2025-10-13 12:45:11 +08:00
parent 8d68e6106e
commit 86c1a4a3a9
3 changed files with 8 additions and 1 deletions

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.23.0
toolchain go1.24.2
require (
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20250425024726-cc17224cb995
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20250916024308-d378e6c57772
git.zhangdeman.cn/zhangdeman/util v0.0.0-20240618042405-6ee2c904644e
github.com/BurntSushi/toml v1.5.0
github.com/go-ini/ini v1.67.0

2
go.sum
View File

@ -1,5 +1,7 @@
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20250425024726-cc17224cb995 h1:LmPRAf0AsxRVFPibdpZR89ajlsz8hof2IvMMyTqiEq4=
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20250425024726-cc17224cb995/go.mod h1:5p8CEKGBxi7qPtTXDI3HDmqKAfIm5i/aBWdrbkbdNjc=
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20250916024308-d378e6c57772 h1:Yo1ur3LnDF5s7F7tpJsNrdUSF8LwYKnN9TdQU32F3eU=
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20250916024308-d378e6c57772/go.mod h1:5p8CEKGBxi7qPtTXDI3HDmqKAfIm5i/aBWdrbkbdNjc=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20240618042405-6ee2c904644e h1:Q973S6CcWr1ICZhFI1STFOJ+KUImCl2BaIXm6YppBqI=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20240618042405-6ee2c904644e/go.mod h1:VpPjBlwz8U+OxZuxzHQBv1aEEZ3pStH6bZvT21ADEbI=
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=

View File

@ -78,6 +78,11 @@ func (oj *ownJSON) UnmarshalWithNumberForIOReaderIgnoreError(ioReader io.ReadClo
return
}
// UnmarshalForString ...
func (oj *ownJSON) UnmarshalForString(input string, receiver any) error {
return oj.Unmarshal([]byte(input), receiver)
}
// UnmarshalWithNumberForString 字符串转结构体
//
// Author : go_developer@163.com<白茶清欢>