Update various files for new version of "stringer"

The latest version of stringer now uses strconv instead of fmt.
This commit is contained in:
Rob Campbell 2017-12-11 16:26:29 -05:00 committed by Martin Atkins
parent c729bdff43
commit 5daeee5f6d
10 changed files with 20 additions and 27 deletions

View File

@ -2,7 +2,7 @@
package local package local
import "fmt" import "strconv"
const _countHookAction_name = "countHookActionAddcountHookActionChangecountHookActionRemove" const _countHookAction_name = "countHookActionAddcountHookActionChangecountHookActionRemove"
@ -10,7 +10,7 @@ var _countHookAction_index = [...]uint8{0, 18, 39, 60}
func (i countHookAction) String() string { func (i countHookAction) String() string {
if i >= countHookAction(len(_countHookAction_index)-1) { if i >= countHookAction(len(_countHookAction_index)-1) {
return fmt.Sprintf("countHookAction(%d)", i) return "countHookAction(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _countHookAction_name[_countHookAction_index[i]:_countHookAction_index[i+1]] return _countHookAction_name[_countHookAction_index[i]:_countHookAction_index[i+1]]
} }

View File

@ -2,7 +2,7 @@
package backend package backend
import "fmt" import "strconv"
const _OperationType_name = "OperationTypeInvalidOperationTypeRefreshOperationTypePlanOperationTypeApply" const _OperationType_name = "OperationTypeInvalidOperationTypeRefreshOperationTypePlanOperationTypeApply"
@ -10,7 +10,7 @@ var _OperationType_index = [...]uint8{0, 20, 40, 57, 75}
func (i OperationType) String() string { func (i OperationType) String() string {
if i >= OperationType(len(_OperationType_index)-1) { if i >= OperationType(len(_OperationType_index)-1) {
return fmt.Sprintf("OperationType(%d)", i) return "OperationType(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _OperationType_name[_OperationType_index[i]:_OperationType_index[i+1]] return _OperationType_name[_OperationType_index[i]:_OperationType_index[i+1]]
} }

View File

@ -2,7 +2,7 @@
package configschema package configschema
import "fmt" import "strconv"
const _NestingMode_name = "nestingModeInvalidNestingSingleNestingListNestingSetNestingMap" const _NestingMode_name = "nestingModeInvalidNestingSingleNestingListNestingSetNestingMap"
@ -10,7 +10,7 @@ var _NestingMode_index = [...]uint8{0, 18, 31, 42, 52, 62}
func (i NestingMode) String() string { func (i NestingMode) String() string {
if i < 0 || i >= NestingMode(len(_NestingMode_index)-1) { if i < 0 || i >= NestingMode(len(_NestingMode_index)-1) {
return fmt.Sprintf("NestingMode(%d)", i) return "NestingMode(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _NestingMode_name[_NestingMode_index[i]:_NestingMode_index[i+1]] return _NestingMode_name[_NestingMode_index[i]:_NestingMode_index[i+1]]
} }

View File

@ -2,7 +2,7 @@
package config package config
import "fmt" import "strconv"
const _ResourceMode_name = "ManagedResourceModeDataResourceMode" const _ResourceMode_name = "ManagedResourceModeDataResourceMode"
@ -10,7 +10,7 @@ var _ResourceMode_index = [...]uint8{0, 19, 35}
func (i ResourceMode) String() string { func (i ResourceMode) String() string {
if i < 0 || i >= ResourceMode(len(_ResourceMode_index)-1) { if i < 0 || i >= ResourceMode(len(_ResourceMode_index)-1) {
return fmt.Sprintf("ResourceMode(%d)", i) return "ResourceMode(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _ResourceMode_name[_ResourceMode_index[i]:_ResourceMode_index[i+1]] return _ResourceMode_name[_ResourceMode_index[i]:_ResourceMode_index[i+1]]
} }

View File

@ -2,7 +2,7 @@
package schema package schema
import "fmt" import "strconv"
const ( const (
_getSource_name_0 = "getSourceStategetSourceConfig" _getSource_name_0 = "getSourceStategetSourceConfig"
@ -13,8 +13,6 @@ const (
var ( var (
_getSource_index_0 = [...]uint8{0, 14, 29} _getSource_index_0 = [...]uint8{0, 14, 29}
_getSource_index_1 = [...]uint8{0, 13}
_getSource_index_2 = [...]uint8{0, 12}
_getSource_index_3 = [...]uint8{0, 18, 32} _getSource_index_3 = [...]uint8{0, 18, 32}
) )
@ -31,6 +29,6 @@ func (i getSource) String() string {
i -= 15 i -= 15
return _getSource_name_3[_getSource_index_3[i]:_getSource_index_3[i+1]] return _getSource_name_3[_getSource_index_3[i]:_getSource_index_3[i+1]]
default: default:
return fmt.Sprintf("getSource(%d)", i) return "getSource(" + strconv.FormatInt(int64(i), 10) + ")"
} }
} }

View File

@ -2,7 +2,7 @@
package schema package schema
import "fmt" import "strconv"
const _ValueType_name = "TypeInvalidTypeBoolTypeIntTypeFloatTypeStringTypeListTypeMapTypeSettypeObject" const _ValueType_name = "TypeInvalidTypeBoolTypeIntTypeFloatTypeStringTypeListTypeMapTypeSettypeObject"
@ -10,7 +10,7 @@ var _ValueType_index = [...]uint8{0, 11, 19, 26, 35, 45, 53, 60, 67, 77}
func (i ValueType) String() string { func (i ValueType) String() string {
if i < 0 || i >= ValueType(len(_ValueType_index)-1) { if i < 0 || i >= ValueType(len(_ValueType_index)-1) {
return fmt.Sprintf("ValueType(%d)", i) return "ValueType(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _ValueType_name[_ValueType_index[i]:_ValueType_index[i+1]] return _ValueType_name[_ValueType_index[i]:_ValueType_index[i+1]]
} }

View File

@ -2,7 +2,7 @@
package terraform package terraform
import "fmt" import "strconv"
const _GraphType_name = "GraphTypeInvalidGraphTypeLegacyGraphTypeRefreshGraphTypePlanGraphTypePlanDestroyGraphTypeApplyGraphTypeInputGraphTypeValidate" const _GraphType_name = "GraphTypeInvalidGraphTypeLegacyGraphTypeRefreshGraphTypePlanGraphTypePlanDestroyGraphTypeApplyGraphTypeInputGraphTypeValidate"
@ -10,7 +10,7 @@ var _GraphType_index = [...]uint8{0, 16, 31, 47, 60, 80, 94, 108, 125}
func (i GraphType) String() string { func (i GraphType) String() string {
if i >= GraphType(len(_GraphType_index)-1) { if i >= GraphType(len(_GraphType_index)-1) {
return fmt.Sprintf("GraphType(%d)", i) return "GraphType(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _GraphType_name[_GraphType_index[i]:_GraphType_index[i+1]] return _GraphType_name[_GraphType_index[i]:_GraphType_index[i+1]]
} }

View File

@ -2,7 +2,7 @@
package terraform package terraform
import "fmt" import "strconv"
const _InstanceType_name = "TypeInvalidTypePrimaryTypeTaintedTypeDeposed" const _InstanceType_name = "TypeInvalidTypePrimaryTypeTaintedTypeDeposed"
@ -10,7 +10,7 @@ var _InstanceType_index = [...]uint8{0, 11, 22, 33, 44}
func (i InstanceType) String() string { func (i InstanceType) String() string {
if i < 0 || i >= InstanceType(len(_InstanceType_index)-1) { if i < 0 || i >= InstanceType(len(_InstanceType_index)-1) {
return fmt.Sprintf("InstanceType(%d)", i) return "InstanceType(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _InstanceType_name[_InstanceType_index[i]:_InstanceType_index[i+1]] return _InstanceType_name[_InstanceType_index[i]:_InstanceType_index[i+1]]
} }

View File

@ -2,7 +2,7 @@
package terraform package terraform
import "fmt" import "strconv"
const _walkOperation_name = "walkInvalidwalkInputwalkApplywalkPlanwalkPlanDestroywalkRefreshwalkValidatewalkDestroywalkImport" const _walkOperation_name = "walkInvalidwalkInputwalkApplywalkPlanwalkPlanDestroywalkRefreshwalkValidatewalkDestroywalkImport"
@ -10,7 +10,7 @@ var _walkOperation_index = [...]uint8{0, 11, 20, 29, 37, 52, 63, 75, 86, 96}
func (i walkOperation) String() string { func (i walkOperation) String() string {
if i >= walkOperation(len(_walkOperation_index)-1) { if i >= walkOperation(len(_walkOperation_index)-1) {
return fmt.Sprintf("walkOperation(%d)", i) return "walkOperation(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _walkOperation_name[_walkOperation_index[i]:_walkOperation_index[i+1]] return _walkOperation_name[_walkOperation_index[i]:_walkOperation_index[i+1]]
} }

View File

@ -2,18 +2,13 @@
package tfdiags package tfdiags
import "fmt" import "strconv"
const ( const (
_Severity_name_0 = "Error" _Severity_name_0 = "Error"
_Severity_name_1 = "Warning" _Severity_name_1 = "Warning"
) )
var (
_Severity_index_0 = [...]uint8{0, 5}
_Severity_index_1 = [...]uint8{0, 7}
)
func (i Severity) String() string { func (i Severity) String() string {
switch { switch {
case i == 69: case i == 69:
@ -21,6 +16,6 @@ func (i Severity) String() string {
case i == 87: case i == 87:
return _Severity_name_1 return _Severity_name_1
default: default:
return fmt.Sprintf("Severity(%d)", i) return "Severity(" + strconv.FormatInt(int64(i), 10) + ")"
} }
} }