2 Star 0 Fork 0

TeamsHub/backend-gopkg

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
enum.go 454 Bytes
Copy Edit Raw Blame History
HCY authored 2024-05-10 12:41 +08:00 . c
package ifc
type Enum struct {
Bool *bool
String *string
}
func (x *Enum) UnmarshalJSON(data []byte) error {
object, err := unmarshalUnion(data, nil, nil, &x.Bool, &x.String, false, nil, false, nil, false, nil, false, nil, false)
if err != nil {
return err
}
if object {
}
return nil
}
func (x *Enum) MarshalJSON() ([]byte, error) {
return marshalUnion(nil, nil, x.Bool, x.String, false, nil, false, nil, false, nil, false, nil, false)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wuzheng0709/backend-gopkg.git
git@gitee.com:wuzheng0709/backend-gopkg.git
wuzheng0709
backend-gopkg
backend-gopkg
v1.3.14

Search