initial commit

This commit is contained in:
Hafizh A. Y
2025-09-25 10:46:46 +07:00
parent c43544e5e8
commit 10506238ae
64 changed files with 3564 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package utils
import "encoding/json"
type NullString struct {
Set bool
Value *string
}
func (ns *NullString) UnmarshalJSON(b []byte) error {
ns.Set = true
if string(b) == "null" {
ns.Value = nil
return nil
}
var s string
if err := json.Unmarshal(b, &s); err != nil {
return err
}
ns.Value = &s
return nil
}