mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 01:44:43 +01:00
rpc: make DataType a stringer, fixing debug messages
This commit is contained in:
parent
3ba3648f0f
commit
4cf910874d
17
rpc/datatype_string.go
Normal file
17
rpc/datatype_string.go
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Code generated by "stringer -type=DataType"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package rpc
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
const _DataType_name = "DataTypeNoneDataTypeControlDataTypeMarshaledJSONDataTypeOctets"
|
||||||
|
|
||||||
|
var _DataType_index = [...]uint8{0, 12, 27, 48, 62}
|
||||||
|
|
||||||
|
func (i DataType) String() string {
|
||||||
|
i -= 1
|
||||||
|
if i >= DataType(len(_DataType_index)-1) {
|
||||||
|
return fmt.Sprintf("DataType(%d)", i+1)
|
||||||
|
}
|
||||||
|
return _DataType_name[_DataType_index[i]:_DataType_index[i+1]]
|
||||||
|
}
|
@ -57,6 +57,7 @@ func NewErrorHeader(status Status, format string, args ...interface{}) (h *Heade
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//go:generate stringer -type=DataType
|
||||||
type DataType uint8
|
type DataType uint8
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
Reference in New Issue
Block a user