While learning go I came to following error:
prog.go:18: not enough arguments in call to method expression JSONParser.Parse
in my test program (https://play.golang.org/p/PW9SF4c9q8):
package main
type Schema struct {
}
type JSONParser struct {
}
func (jsonParser JSONParser) Parse(toParse []byte) ([]Schema, int) {
var schema []Schema
// whatever parsing logic
return schema, 0
}
func main() {
var in []byte
actual, err2 := JSONParser.Parse(in)
}
Anyone willing to help me to move on here?