mirror of https://github.com/1Panel-dev/1Panel
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.
30 lines
500 B
30 lines
500 B
package ssl
|
|
|
|
import (
|
|
"bytes"
|
|
"fmt"
|
|
"sort"
|
|
)
|
|
|
|
type obtainError map[string]error
|
|
|
|
func (e obtainError) Error() string {
|
|
buffer := bytes.NewBufferString("error: one or more domains had a problem:\n")
|
|
|
|
var domains []string
|
|
for domain := range e {
|
|
domains = append(domains, domain)
|
|
}
|
|
sort.Strings(domains)
|
|
|
|
for _, domain := range domains {
|
|
buffer.WriteString(fmt.Sprintf("[%s] %s\n", domain, e[domain]))
|
|
}
|
|
return buffer.String()
|
|
}
|
|
|
|
type domainError struct {
|
|
Domain string
|
|
Error error
|
|
}
|