make generate: stringer was updated and now uses strconv instead of fmt

bd4635fd25 (diff-0415b5286e4cf3e373f349d917e5e039)
This commit is contained in:
Christian Schwarz 2018-04-01 15:30:04 +02:00
parent 0d2f73d728
commit 75fd21e454
4 changed files with 8 additions and 9 deletions

View File

@ -2,7 +2,7 @@
package rpc
import "fmt"
import "strconv"
const _DataType_name = "DataTypeNoneDataTypeControlDataTypeMarshaledJSONDataTypeOctets"
@ -11,7 +11,7 @@ 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(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _DataType_name[_DataType_index[i]:_DataType_index[i+1]]
}

View File

@ -2,7 +2,7 @@
package rpc
import "fmt"
import "strconv"
const (
_FrameType_name_0 = "FrameTypeHeaderFrameTypeDataFrameTypeTrailer"
@ -11,7 +11,6 @@ const (
var (
_FrameType_index_0 = [...]uint8{0, 15, 28, 44}
_FrameType_index_1 = [...]uint8{0, 12}
)
func (i FrameType) String() string {
@ -22,6 +21,6 @@ func (i FrameType) String() string {
case i == 255:
return _FrameType_name_1
default:
return fmt.Sprintf("FrameType(%d)", i)
return "FrameType(" + strconv.FormatInt(int64(i), 10) + ")"
}
}

View File

@ -2,7 +2,7 @@
package rpc
import "fmt"
import "strconv"
const _Status_name = "StatusOKStatusRequestErrorStatusServerErrorStatusError"
@ -11,7 +11,7 @@ var _Status_index = [...]uint8{0, 8, 26, 43, 54}
func (i Status) String() string {
i -= 1
if i >= Status(len(_Status_index)-1) {
return fmt.Sprintf("Status(%d)", i+1)
return "Status(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _Status_name[_Status_index[i]:_Status_index[i+1]]
}

View File

@ -2,7 +2,7 @@
package zfs
import "fmt"
import "strconv"
const _Conflict_name = "ConflictIncrementalConflictAllRightConflictNoCommonAncestorConflictDiverged"
@ -10,7 +10,7 @@ var _Conflict_index = [...]uint8{0, 19, 35, 59, 75}
func (i Conflict) String() string {
if i < 0 || i >= Conflict(len(_Conflict_index)-1) {
return fmt.Sprintf("Conflict(%d)", i)
return "Conflict(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Conflict_name[_Conflict_index[i]:_Conflict_index[i+1]]
}