panic with 0.5.0
thielepaul opened this issue · 1 comments
thielepaul commented
With the latest version I get a panic when I try to generate the docs:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x8b6138]
goroutine 3864 [running]:
go101.org/golds/internal/server.(*docServer).WriteAstType(0xc0000c4000, 0xc028a42190, {0xa979a8?, 0xc01e321b20?}, 0xc022881980, 0xc022881980, 0x2?, 0xa3?, 0x0)
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/page_package-details.go:2407 +0x1b8
go101.org/golds/internal/server.(*docServer).writeResourceIndexHTML(0xc0000c4000, 0xc028a42190, 0xc022881980, {0xa99160, 0xc022abe620?}, 0x1, 0x1, 0x0)
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/page_package-details.go:2015 +0xc1c
go101.org/golds/internal/server.(*docServer).buildPackageDetailsPage.func8()
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/page_package-details.go:444 +0x45
go101.org/golds/internal/server.writeFoldingBlock(0xa91364?, {0xc01e30b680, 0xd}, {0x9b2462, 0x7}, {0x9afac0, 0x4}, 0x0, 0xc005717ae8, 0xc005717c00)
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/page_package-details.go:2748 +0x202
go101.org/golds/internal/server.(*docServer).buildPackageDetailsPage(0xc0000c4000, {0xa97fa8?, 0xc01a5a0000}, 0xc027a45e00)
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/page_package-details.go:442 +0x1054
go101.org/golds/internal/server.(*docServer).packageDetailsPage(0xc0000c4000, {0xa97fa8, 0xc01a5a0000}, 0x9b1b62?, {0xc023a75185, 0x6})
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/page_package-details.go:60 +0x2ee
go101.org/golds/internal/server.(*docServer).ServeHTTP(0xc0000c4000, {0xa97fa8, 0xc01a5a0000}, 0xc0242ca100)
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/server.go:212 +0x838
go101.org/golds/internal/server.GenDocs.func1({0xc023a75180, 0xb})
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/tool_gen-docs.go:523 +0x145
go101.org/golds/internal/server.GenDocs.func3()
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/tool_gen-docs.go:572 +0xb1
created by go101.org/golds/internal/server.GenDocs
/home/paul/go/pkg/mod/go101.org/golds@v0.5.0/internal/server/tool_gen-docs.go:565 +0x5b2
zigo101 commented
@thielepaul
Sorry for my carelessness. I have fixed this problem in v0.5.1 and make the release flow more robust.
Many thanks for submitting this issue!