mirror of
https://github.com/hanzo-ds/native.git
synced 2026-10-30 20:00:34 +00:00
Module path, package names, and identifiers de-branded to native/proto/compress/ pool/tracing. Server wire-protocol strings preserved. Vendored codec surface used by hanzo-ds/go (proto + compress).
16 lines
334 B
Go
16 lines
334 B
Go
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
|