gotsrpc/demo/demo.go
2017-07-03 15:17:27 +02:00

23 lines
347 B
Go

package demo
type Err struct {
Message string `json:"message"`
}
type ScalarInPlace string
type Demo struct {
Bla bool
}
func (d *Demo) Hello(name string) (string, *Err) {
if name == "Peter" {
return "", &Err{"fuck you Peter I do not like you"}
}
return "Hello from the server: " + name, nil
}
func (d *Demo) nothingInNothinOut() {
}