Moved to google.golang.org/genproto/googleapis/api/annotations
Fixes #52
This commit is contained in:
		
							
								
								
									
										31
									
								
								vendor/github.com/go-kit/kit/examples/stringsvc3/service.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								vendor/github.com/go-kit/kit/examples/stringsvc3/service.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"errors"
 | 
			
		||||
	"strings"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// StringService provides operations on strings.
 | 
			
		||||
type StringService interface {
 | 
			
		||||
	Uppercase(string) (string, error)
 | 
			
		||||
	Count(string) int
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type stringService struct{}
 | 
			
		||||
 | 
			
		||||
func (stringService) Uppercase(s string) (string, error) {
 | 
			
		||||
	if s == "" {
 | 
			
		||||
		return "", ErrEmpty
 | 
			
		||||
	}
 | 
			
		||||
	return strings.ToUpper(s), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (stringService) Count(s string) int {
 | 
			
		||||
	return len(s)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ErrEmpty is returned when an input string is empty.
 | 
			
		||||
var ErrEmpty = errors.New("empty string")
 | 
			
		||||
 | 
			
		||||
// ServiceMiddleware is a chainable behavior modifier for StringService.
 | 
			
		||||
type ServiceMiddleware func(StringService) StringService
 | 
			
		||||
		Reference in New Issue
	
	Block a user