code: func generateService(ctx *context, w io.Writer, svc *Service) {
  	reqTyp := camelCaseName(svc.RequestType)
  
  	// method name is same as parameter type name by default
  	method := reqTyp
  	if svc.Stream {
  		// use Dump as prefix instead of suffix for stream services
  		if m := strings.TrimSuffix(method, "Dump"); method != m {
  			method = "Dump" + m
  		}
  	}
  
  	params := fmt.Sprintf("*%s", reqTyp)
  	returns := "error"
  	if replyType := camelCaseName(svc.ReplyType); replyType != "" {
  		repTyp := fmt.Sprintf("*%s", replyType)
  		if svc.Stream {
  			repTyp = fmt.Sprintf("[]%s", repTyp)
  		}
  		returns = fmt.Sprintf("(%s, error)", repTyp)
  	}
  
  	fmt.Fprintf(w, "\t%s(%s) %s\n", method, params, returns)
  }
docs: // generateService writes generated code for the service into w