6tail / lunar-go

日历、公历(阳历)、农历(阴历、老黄历)、道历、佛历,支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.
https://6tail.cn/calendar/api.html
MIT License
215 stars 57 forks source link

calendar.ListSolarFromBaZi 八字反推阳历 部分八字无法反推 #15

Closed orzmoe closed 5 months ago

orzmoe commented 6 months ago

比如测试用例中的 "丙辰", "丁酉", "丙子", "甲午"

--- FAIL: TestEightChar12 (0.04s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x52a5eb]

goroutine 13 [running]:
testing.tRunner.func1.2({0x55dbe0, 0x6c3c90})
        /usr/local/go/src/testing/testing.go:1545 +0x238
testing.tRunner.func1()
        /usr/local/go/src/testing/testing.go:1548 +0x397
panic({0x55dbe0?, 0x6c3c90?})
        /usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/6tail/lunar-go/test.TestEightChar12(0xc00020f1e0)
        /root/go/pkg/mod/github.com/6tail/lunar-go@v1.3.7/test/EightChar_test.go:147 +0xcb
testing.tRunner(0xc00020f1e0, 0x59de20)
        /usr/local/go/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 1
        /usr/local/go/src/testing/testing.go:1648 +0x3ad
exit status 2
FAIL    github.com/6tail/lunar-go/test  0.046s
6tail commented 6 months ago

v1.3.8 已修复。