Skip to content

Instantly share code, notes, and snippets.

@djmitche
Created May 21, 2015 19:10
Show Gist options
  • Select an option

  • Save djmitche/7887a414c2c5f9a21fb0 to your computer and use it in GitHub Desktop.

Select an option

Save djmitche/7887a414c2c5f9a21fb0 to your computer and use it in GitHub Desktop.
package main
func call_a_thing(f func() interface{}) {
}
type Structure struct {
a int
}
func thing1() Structure {
return Structure{1}
}
func main() {
call_a_thing((func () interface{})(thing1))
}
./foo.go:15: cannot convert thing1 (type func() Structure) to type func() interface {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment