Created
March 1, 2014 22:57
-
-
Save robertknight/9298862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type SomeInterface interface { | |
Method(paramA int, paramB int) (int, error) | |
} | |
type SomeInterfaceServer struct { | |
i *SomeInterface | |
} | |
type MethodArgs { | |
ParamA int | |
ParamB int | |
} | |
func (s *SomeInterfaceServer) Method(args MethodArgs, reply *int) error { | |
result, err := s.i.Method(args.ParamA, args.ParamB) | |
*reply = result | |
return err | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment