rpc: make DataType a stringer, fixing debug messages

This commit is contained in:
Christian Schwarz 2018-02-08 23:39:46 +01:00
parent 3ba3648f0f
commit 4cf910874d
2 changed files with 18 additions and 0 deletions

17
rpc/datatype_string.go Normal file
View 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]]
}

View File

@ -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 (