babyname/fate

[BUG] panic: runtime error: invalid memory address or nil pointer dereference

cexll opened this issue · 1 comments

cexll commented

$ fate name -l "陈" -b "2000/06/25 19:00"

config will output to /home/imorta/config.json
GOROOT: /opt/hostedtoolcache/go/1.13.12/x64
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x8b4f94]

goroutine 1 [running]:
main.zoneCheck(0xc0001f6000, 0x0)
/home/runner/work/fate/fate/cmd/console/init.go:58 +0x184
main.cmdInit.func1(0xc0000bea00, 0xe356e8, 0x0, 0x0)
/home/runner/work/fate/fate/cmd/console/init.go:34 +0x508
github.com/spf13/cobra.(*Command).execute(0xc0000bea00, 0xe356e8, 0x0, 0x0, 0xc0000bea00, 0xe356e8)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xe108a0, 0xc0000b5f40, 0x2, 0x2)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main()
/home/runner/work/fate/fate/cmd/console/main.go:21 +0x8b
LJ4OEE9C}F30SN$IK}ZAHTN
运行环境: Win10 LTSC 2019 WSL Ubuntu20
未安装GO
数据库已配置好
zoneinfo.zip 也在同一目录
在cmd也一样

已修正
1.重新执行一遍init
2.下载最新版本
上面两种方式应该都可以解决