Skip to content

Instantly share code, notes, and snippets.

@robertknight
Created March 1, 2014 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertknight/9298862 to your computer and use it in GitHub Desktop.
Save robertknight/9298862 to your computer and use it in GitHub Desktop.
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