Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

总会出现“panic: runtime error: invalid memory address or nil pointer dereference”错误 #3

Closed
kerncoola opened this issue Jan 13, 2021 · 3 comments

Comments

@kerncoola
Copy link

classID 354
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x174dd7e]

goroutine 1 [running]:
github.com/yann0917/dedao-dl/cmd/app.CourseInfo(0x162, 0x400, 0x203000, 0x400)
/Users/123/go/pkg/mod/github.com/yann0917/dedao-dl@v0.0.0-20210112030314-f8244ebe0873/cmd/app/course.go:33 +0x5e
github.com/yann0917/dedao-dl/cmd.courseInfo(0x162, 0xc000010018, 0xc0001abd78)
/Users/123/go/pkg/mod/github.com/yann0917/dedao-dl@v0.0.0-20210112030314-f8244ebe0873/cmd/course.go:118 +0x45
github.com/yann0917/dedao-dl/cmd.glob..func4(0x204c840, 0xc0001e3980, 0x0, 0x2, 0x0, 0x0)
/Users/123/go/pkg/mod/github.com/yann0917/dedao-dl@v0.0.0-20210112030314-f8244ebe0873/cmd/course.go:44 +0xba
github.com/spf13/cobra.(*Command).execute(0x204c840, 0xc0001e3960, 0x2, 0x2, 0x204c840, 0xc0001e3960)
/Users/123/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0x204c060, 0x0, 0x0, 0xc00008e058)
/Users/123/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/Users/123/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/yann0917/dedao-dl/cmd.Execute(...)
/Users/123/go/pkg/mod/github.com/yann0917/dedao-dl@v0.0.0-20210112030314-f8244ebe0873/cmd/root.go:29
main.main()
/Users/123/go/pkg/mod/github.com/yann0917/dedao-dl@v0.0.0-20210112030314-f8244ebe0873/main.go:17 +0x2e

@yann0917
Copy link
Owner

  1. 运行 dedao-dl course 查看购买过的课程, 看看 354 这个课程是不是你购买过的
  2. 如果是未购买过的 ,这里可以做个优化,提示未购买。

@yann0917 yann0917 reopened this Jan 16, 2021
@yann0917
Copy link
Owner

得到的分页策略改了,不能一次性请求所有的文章。

@yann0917
Copy link
Owner

问题已修复,并新增『每天听本书可下载』功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants