mirror of
https://github.com/InazumaV/Ratte.git
synced 2026-02-04 04:30:09 +00:00
22 lines
403 B
Go
22 lines
403 B
Go
package boot
|
|
|
|
import (
|
|
"github.com/InazumaV/Ratte/acme"
|
|
"github.com/InazumaV/Ratte/conf"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type AcmeGroup map[string]*acme.Acme
|
|
|
|
func initAcme(a []conf.ACME) AcmeGroup {
|
|
acmes := make(AcmeGroup, len(a))
|
|
for _, a := range a {
|
|
ac, err := acme.NewAcme(&a)
|
|
if err != nil {
|
|
log.WithError(err).Fatal("New acme failed")
|
|
}
|
|
acmes[a.Name] = ac
|
|
}
|
|
return acmes
|
|
}
|