We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2013/05/30 17:26:17 GET / 2013/05/30 17:26:17 Handler crashed with error runtime error: index out of range 2013/05/30 17:26:17 /usr/lib/go/src/pkg/runtime/panic.c 229 2013/05/30 17:26:17 /usr/lib/go/src/pkg/runtime/panic.c 487 2013/05/30 17:26:17 /usr/lib/go/src/pkg/runtime/panic.c 442 2013/05/30 17:26:17 /home/sasha/dev/go/src/github.com/jmoiron/monet/blog/app.go 71 2013/05/30 17:26:17 /usr/lib/go/src/pkg/reflect/value.go 474 2013/05/30 17:26:17 /usr/lib/go/src/pkg/reflect/value.go 345 2013/05/30 17:26:17 /home/sasha/dev/go/src/github.com/hoisie/web/server.go 196 2013/05/30 17:26:17 /home/sasha/dev/go/src/github.com/hoisie/web/server.go 305 2013/05/30 17:26:17 /home/sasha/dev/go/src/github.com/hoisie/web/server.go 87 2013/05/30 17:26:17 /home/sasha/dev/go/src/github.com/hoisie/web/server.go 82 2013/05/30 17:26:17 /usr/lib/go/src/pkg/net/http/server.go 1416 2013/05/30 17:26:17 /usr/lib/go/src/pkg/net/http/server.go 1517 2013/05/30 17:26:17 /usr/lib/go/src/pkg/net/http/server.go 1096 2013/05/30 17:26:17 /usr/lib/go/src/pkg/runtime/proc.c 1223
The notable line here is in app.go. As of 5798410 (the current version), it is.
app.go
post = &posts[0]
There is currently no check to make certain that len(posts) > 0, and this causes a runtime error.
len(posts) > 0
The text was updated successfully, but these errors were encountered:
I too have this issue and can't work out how to fix it. I tried inserting a post manually into the database but I get the same error.
Any suggestions on how to fix?
Sorry, something went wrong.
Hrm, I originally had a bunch to pull in from a previous blog I wrote; I'll make sure that it'l work with 0 posts.
No branches or pull requests
The notable line here is in
app.go
. As of 5798410 (the current version), it is.There is currently no check to make certain that
len(posts) > 0
, and this causes a runtime error.The text was updated successfully, but these errors were encountered: