From f6367a779abac2c8b66ed10ddfe56afe1d156415 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Wed, 4 Feb 2015 01:54:14 +0900 Subject: [PATCH] regenerate with new stringer. --- helper/schema/valuetype_string.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/helper/schema/valuetype_string.go b/helper/schema/valuetype_string.go index 484a83963..fec00944e 100644 --- a/helper/schema/valuetype_string.go +++ b/helper/schema/valuetype_string.go @@ -6,16 +6,11 @@ import "fmt" const _ValueType_name = "TypeInvalidTypeBoolTypeIntTypeFloatTypeStringTypeListTypeMapTypeSettypeObject" -var _ValueType_index = [...]uint8{11, 19, 26, 35, 45, 53, 60, 67, 77} +var _ValueType_index = [...]uint8{0, 11, 19, 26, 35, 45, 53, 60, 67, 77} func (i ValueType) String() string { - if i < 0 || i >= ValueType(len(_ValueType_index)) { + if i < 0 || i+1 >= ValueType(len(_ValueType_index)) { return fmt.Sprintf("ValueType(%d)", i) } - hi := _ValueType_index[i] - lo := uint8(0) - if i > 0 { - lo = _ValueType_index[i-1] - } - return _ValueType_name[lo:hi] + return _ValueType_name[_ValueType_index[i]:_ValueType_index[i+1]] }