option.go 177 B

12345678910
  1. package fserr
  2. type Option func(*withCode)
  3. // MsgOption 替换错误码默认的提示信息
  4. func MsgOption(msg string) Option {
  5. return func(w *withCode) {
  6. w.Msg = msg
  7. }
  8. }