prefer PlainText interface over String interface

This commit is contained in:
c9s 2021-05-16 01:21:35 +08:00
parent f176afee6f
commit b4f6653ccc

View File

@ -67,12 +67,12 @@ func (n *Notifier) NotifyTo(channel string, obj interface{}, args ...interface{}
log.Infof(a, pureArgs...)
message = fmt.Sprintf(a, pureArgs...)
case types.Stringer:
message = a.String()
case types.PlainText:
message = a.PlainText()
case types.Stringer:
message = a.String()
default:
log.Errorf("unsupported notification format: %T %+v", a, a)