/* * 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} }