Skip to content

Commit

Permalink
chore(cmd): add charload cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
godcong committed Nov 27, 2023
1 parent 122d3a4 commit 038b3f5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cmd/charload/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package main

import (
"encoding/json"
"log/slog"
"os"
)

var path = "./char.json"

func main() {

file, err := os.ReadFile(path)
if err != nil {
slog.Error("read file error", "info", err)
return
}
var char map[any]any
err = json.Unmarshal(file, &char)
if err != nil {
slog.Error("unmarshal error", "info", err)
return
}
//todo
}

0 comments on commit 038b3f5

Please sign in to comment.