From 78e7519efa2d34ea69aa388be17f8e8487347f17 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Wed, 3 Jun 2015 08:37:57 -0500 Subject: [PATCH] Updates from go generate --- helper/schema/valuetype_string.go | 2 +- terraform/graphnodeconfigtype_string.go | 2 +- terraform/instancetype_string.go | 2 +- terraform/walkoperation_string.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helper/schema/valuetype_string.go b/helper/schema/valuetype_string.go index fec00944e..42442a46b 100644 --- a/helper/schema/valuetype_string.go +++ b/helper/schema/valuetype_string.go @@ -9,7 +9,7 @@ const _ValueType_name = "TypeInvalidTypeBoolTypeIntTypeFloatTypeStringTypeListTy var _ValueType_index = [...]uint8{0, 11, 19, 26, 35, 45, 53, 60, 67, 77} func (i ValueType) String() string { - if i < 0 || i+1 >= ValueType(len(_ValueType_index)) { + if i < 0 || i >= ValueType(len(_ValueType_index)-1) { return fmt.Sprintf("ValueType(%d)", i) } return _ValueType_name[_ValueType_index[i]:_ValueType_index[i+1]] diff --git a/terraform/graphnodeconfigtype_string.go b/terraform/graphnodeconfigtype_string.go index de24c2dcd..d8c1724f4 100644 --- a/terraform/graphnodeconfigtype_string.go +++ b/terraform/graphnodeconfigtype_string.go @@ -9,7 +9,7 @@ const _GraphNodeConfigType_name = "GraphNodeConfigTypeInvalidGraphNodeConfigType var _GraphNodeConfigType_index = [...]uint8{0, 26, 53, 80, 105, 130, 157} func (i GraphNodeConfigType) String() string { - if i < 0 || i+1 >= GraphNodeConfigType(len(_GraphNodeConfigType_index)) { + if i < 0 || i >= GraphNodeConfigType(len(_GraphNodeConfigType_index)-1) { return fmt.Sprintf("GraphNodeConfigType(%d)", i) } return _GraphNodeConfigType_name[_GraphNodeConfigType_index[i]:_GraphNodeConfigType_index[i+1]] diff --git a/terraform/instancetype_string.go b/terraform/instancetype_string.go index fc8697644..3114bc157 100644 --- a/terraform/instancetype_string.go +++ b/terraform/instancetype_string.go @@ -9,7 +9,7 @@ const _InstanceType_name = "TypeInvalidTypePrimaryTypeTaintedTypeDeposed" var _InstanceType_index = [...]uint8{0, 11, 22, 33, 44} func (i InstanceType) String() string { - if i < 0 || i+1 >= InstanceType(len(_InstanceType_index)) { + if i < 0 || i >= InstanceType(len(_InstanceType_index)-1) { return fmt.Sprintf("InstanceType(%d)", i) } return _InstanceType_name[_InstanceType_index[i]:_InstanceType_index[i+1]] diff --git a/terraform/walkoperation_string.go b/terraform/walkoperation_string.go index ddd894f53..423793c3c 100644 --- a/terraform/walkoperation_string.go +++ b/terraform/walkoperation_string.go @@ -9,7 +9,7 @@ const _walkOperation_name = "walkInvalidwalkInputwalkApplywalkPlanwalkPlanDestro var _walkOperation_index = [...]uint8{0, 11, 20, 29, 37, 52, 63, 75} func (i walkOperation) String() string { - if i+1 >= walkOperation(len(_walkOperation_index)) { + if i >= walkOperation(len(_walkOperation_index)-1) { return fmt.Sprintf("walkOperation(%d)", i) } return _walkOperation_name[_walkOperation_index[i]:_walkOperation_index[i+1]]