diff --git a/util/messages/messages.go b/util/messages/messages.go index 3f1f94b1..7d320b2e 100644 --- a/util/messages/messages.go +++ b/util/messages/messages.go @@ -101,13 +101,13 @@ func (mes *Messages) ClearAllInfos() { // ClearErrors : Erase all errors in messages func (mes *Messages) ClearErrors(name string) { - mes.Errors[name] = nil + delete(mes.Errors, name) mes.setMessagesInContext() } // ClearInfos : Erase all infos in messages func (mes *Messages) ClearInfos(name string) { - mes.Infos[name] = nil + delete(mes.Infos, name) mes.setMessagesInContext() }