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
package main import ( "github.com/komuw/kama" "gopkg.in/mgo.v2" ) func main() { var ss *mgo.Session kama.Dirp(ss) }
panic: reflect: call of reflect.Value.Type on zero Value goroutine 1 [running]: reflect.Value.Type(0x0, 0x0, 0x0, 0x0, 0x0) /usr/local/go-faketime/src/reflect/value.go:1908 +0x189 github.com/komuw/kama.getKind(0x7700c0, 0x0, 0xc000018650) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/vars.go:125 +0x115 github.com/komuw/kama.newVari(0x7700c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/vars.go:37 +0x134 github.com/komuw/kama.Dir(0x7700c0, 0x0, 0xc000034748, 0x96d880) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/kama.go:75 +0x485 github.com/komuw/kama.Dirp(0x7700c0, 0x0) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/kama.go:35 +0x39 main.main() /tmp/sandbox858069193/prog.go:10 +0x36
The text was updated successfully, but these errors were encountered:
However this;
package main import ( "github.com/komuw/kama" ) func main() { kama.Dirp(nil) }
works out okay
[ NAME: nil KIND: ptr SIGNATURE: [nil] FIELDS: [] METHODS: [] SNIPPET: nil ]
Sorry, something went wrong.
issues/25: zero value pointers should not panic (#37)
406f831
What: - Zero value pointers should not panic Why: - Fixes: #25
Successfully merging a pull request may close this issue.
panic: reflect: call of reflect.Value.Type on zero Value goroutine 1 [running]: reflect.Value.Type(0x0, 0x0, 0x0, 0x0, 0x0) /usr/local/go-faketime/src/reflect/value.go:1908 +0x189 github.com/komuw/kama.getKind(0x7700c0, 0x0, 0xc000018650) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/vars.go:125 +0x115 github.com/komuw/kama.newVari(0x7700c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/vars.go:37 +0x134 github.com/komuw/kama.Dir(0x7700c0, 0x0, 0xc000034748, 0x96d880) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/kama.go:75 +0x485 github.com/komuw/kama.Dirp(0x7700c0, 0x0) /tmp/gopath982500244/pkg/mod/github.com/komuw/kama@v0.0.3/kama.go:35 +0x39 main.main() /tmp/sandbox858069193/prog.go:10 +0x36
The text was updated successfully, but these errors were encountered: