Documentation ¶
Index ¶
- Constants
- Variables
- func Empty(value interface{}) bool
- func NotEmpty(value interface{}) bool
- func SetStderr(e io.WriteCloser)
- func SetStdout(o io.WriteCloser)
- func Stderr() io.WriteCloser
- func Stdout() io.WriteCloser
- type Bool
- type Checker
- type CodeError
- func (c *CodeError) AppendDesc(desc string) *CodeError
- func (c *CodeError) AppendDescF(f string, a ...interface{}) *CodeError
- func (c *CodeError) AppendError(err error) *CodeError
- func (c *CodeError) Error() string
- func (c *CodeError) HeaderInsertDesc(desc string) *CodeError
- func (c *CodeError) HeaderInsertDescF(f string, a ...interface{}) *CodeError
- func (c *CodeError) SetCode(code int) *CodeError
- type Int
- type Int64
- type String
Constants ¶
View Source
const ( TrueString = "true" FalseString = "false" ResumeApiV1 = "v1" ResumeApiV2 = "v2" StatusOK = iota // process success StatusError // process error StatusHalt // local error StatusUserCancel // 用户取消 DefaultLineSeparate = "\t" BLOCK_BITS = 22 // Indicate that the blocksize is 4M BLOCK_SIZE = 1 << BLOCK_BITS // BLOCK SIZE )
Variables ¶
View Source
var ( ErrorCodeUnknown = -10000 ErrorCodeParamNotExist = -11000 ErrorCodeParamMissing = -11001 ErrorCodeAlreadyDone = -15000 )
Functions ¶
func SetStderr ¶
func SetStderr(e io.WriteCloser)
func SetStdout ¶
func SetStdout(o io.WriteCloser)
func Stderr ¶
func Stderr() io.WriteCloser
func Stdout ¶
func Stdout() io.WriteCloser
Types ¶
type CodeError ¶
func ConvertError ¶
func NewAlreadyDoneError ¶
func NewEmptyError ¶
func NewEmptyError() *CodeError
func NewErrorWithCode ¶
func (*CodeError) AppendDesc ¶
func (*CodeError) AppendDescF ¶
func (*CodeError) AppendError ¶
func (*CodeError) HeaderInsertDesc ¶
func (*CodeError) HeaderInsertDescF ¶
Click to show internal directories.
Click to hide internal directories.