mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-18 19:47:07 +02:00
large refactor, fixes #2
This commit is contained in:
parent
2729c66ccc
commit
7aa034f3ba
59 changed files with 2766 additions and 1345 deletions
10
server/internal/utils/json.go
Normal file
10
server/internal/utils/json.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package utils
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
func Unmarshal(in interface{}, raw []byte, callback func() error) error {
|
||||
if err := json.Unmarshal(raw, &in); err != nil {
|
||||
return err
|
||||
}
|
||||
return callback()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue