mirror of https://github.com/1Panel-dev/1Panel
appstorecrontabdatabasedockerdocker-composedocker-containerdocker-imagedocker-uifilemanagerlamplnmppanel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
365 B
23 lines
365 B
package buserr |
|
|
|
import ( |
|
"bytes" |
|
"fmt" |
|
"sort" |
|
) |
|
|
|
type MultiErr map[string]error |
|
|
|
func (e MultiErr) Error() string { |
|
var keys []string |
|
for key := range e { |
|
keys = append(keys, key) |
|
} |
|
sort.Strings(keys) |
|
|
|
buffer := bytes.NewBufferString("") |
|
for _, key := range keys { |
|
buffer.WriteString(fmt.Sprintf("[%s] %s\n", key, e[key])) |
|
} |
|
return buffer.String() |
|
}
|
|
|