Documentation
¶
Index ¶
- Constants
- func CombineKV(keysAndValues ...interface{}) string
- func E0001(sheetName, BookName string) error
- func E2001(refer string, messageName string) error
- func E2002(value string, refer string) error
- func E2003(value string, sequence int64) error
- func E2004(value interface{}, vrange string) error
- func E2005(key interface{}) error
- func E2006(value, enumName interface{}) error
- func E2007(value, err interface{}) error
- func E2008(value, err interface{}) error
- func E2009(key, fieldName interface{}) error
- func E2010(typeValue, fieldNumber interface{}) error
- func ErrorKV(msg string, keysAndValues ...interface{}) error
- func Errorf(format string, args ...interface{}) error
- func WithMessageKV(err error, keysAndValues ...interface{}) error
- func WithStack(err error) error
- func WrapKV(err error, keysAndValues ...interface{}) error
- type Desc
Constants ¶
View Source
const ( ModuleDefault = "default" ModuleProto = "protogen" ModuleConf = "confgen" )
View Source
const ( // The String method processing logic of Desc is dependent on this key's corresponding value. // module: default, proto, conf. KeyModule = "Module" KeyIndir = "Indir" // input dir KeySubdir = "Subdir" // input subdir KeyOutdir = "Outdir" // output dir KeyBookName = "BookName" // workbook name KeySheetName = "SheetName" // worksheet name KeyNameCellPos = "NameCellPos" // name cell position KeyNameCell = "NameCell" // name cell value KeyTrimmedNameCell = "TrimmedNameCell" // trimmed name cell value KeyTypeCellPos = "TypeCellPos" // type cell position KeyTypeCell = "TypeCell" // type cell value KeyDataCellPos = "DataCellPos" // data cell position KeyDataCell = "DataCell" // data data value KeyPBMessage = "PBMessage" // protobuf message name KeyPBFieldName = "PBFieldName" // protobuf message field name KeyPBFieldType = "PBFieldType" // protobuf message field type KeyPBFieldOpts = "PBFieldOpts" // protobuf message field options (extensions) KeyColumnName = "ColumnName" // column name )
desc keys for bookkeeping
Variables ¶
This section is empty.
Functions ¶
func E2006 ¶
func E2006(value, enumName interface{}) error
E2006 describes enum value not defined in enum type.
func E2009 ¶ added in v0.10.7
func E2009(key, fieldName interface{}) error
E2009 describes duplicate key.
func E2010 ¶ added in v0.10.7
func E2010(typeValue, fieldNumber interface{}) error
E2010 describes union type and value field mismatch.
func ErrorKV ¶
ErrorKV returns an error with the supplied message and the key-value pairs as `[|key: value]...` string. ErrorKV also records the stack trace at the point it was called.
func Errorf ¶
Errorf formats according to a format specifier and returns the string as a value that satisfies error.
func WithMessageKV ¶
WithMessageKV annotates err with the key-value pairs as `[|key: value]...` string. If err is nil, WithMessageKV returns nil.
Types ¶
type Desc ¶
type Desc struct {
// contains filtered or unexported fields
}
func (*Desc) DebugString ¶
Click to show internal directories.
Click to hide internal directories.