retcode.Error() from go generate

This commit is contained in:
Ethan Buchman
2015-11-27 11:07:16 -05:00
parent 201bf2374b
commit 4d0eb1d95a
2 changed files with 40 additions and 5 deletions

16
types/retcode_string.go Normal file
View File

@ -0,0 +1,16 @@
// generated by stringer -type=RetCode; DO NOT EDIT
package types
import "fmt"
const _RetCode_name = "RetCodeOKRetCodeInternalErrorRetCodeUnauthorizedRetCodeInsufficientFeesRetCodeUnknownRequest"
var _RetCode_index = [...]uint8{0, 9, 29, 48, 71, 92}
func (i RetCode) String() string {
if i < 0 || i+1 >= RetCode(len(_RetCode_index)) {
return fmt.Sprintf("RetCode(%d)", i)
}
return _RetCode_name[_RetCode_index[i]:_RetCode_index[i+1]]
}