blob: 3eca1481d19e38d383aac8ff194b9d98f115c25f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package proto
import "fmt"
// Error on server side.
type Error int
func (e Error) Error() string {
if e.IsAError() {
return fmt.Sprintf("%s (%d)", e.String(), e)
}
return fmt.Sprintf("UNKNOWN (%d)", e)
}
//go:generate go run github.com/dmarkham/enumer -transform snake_upper -type Error -trimprefix Err -output error_enum.go
|