Browse Source

init

master v0.1.0
guzeng 3 years ago
parent
commit
be30e73813
1 changed files with 25 additions and 0 deletions
  1. +25
    -0
      ttlError.go

+ 25
- 0
ttlError.go View File

@ -0,0 +1,25 @@
/*
* package error event
* Copyright (c) 2017 R&D.
* By guzeng
* 2018/01/05
*/
package ttlerr
/**
* 定义error
*/
type TTLError struct {
Code string
Msg string
}
func (e TTLError) Error() string {
return e.Code + " | " + e.Msg
}
func NewErr(code string, msg string) *TTLError {
return &TTLError{Code: code, Msg: msg}
}

Loading…
Cancel
Save