Skip to content

Commit

Permalink
Trim whitespace after replacing placeholders (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinDaWizard authored Oct 16, 2024
1 parent 1fc64b9 commit 6b466fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package porkbun

import (
"strings"
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
porkbun "github.com/libdns/porkbun"
Expand All @@ -23,8 +24,8 @@ func (Provider) CaddyModule() caddy.ModuleInfo {

// Provision sets up the module. Implements caddy.Provisioner.
func (p *Provider) Provision(ctx caddy.Context) error {
p.Provider.APIKey = caddy.NewReplacer().ReplaceAll(p.Provider.APIKey, "")
p.Provider.APISecretKey = caddy.NewReplacer().ReplaceAll(p.Provider.APISecretKey, "")
p.Provider.APIKey = strings.TrimSpace(caddy.NewReplacer().ReplaceAll(p.Provider.APIKey, ""))
p.Provider.APISecretKey = strings.TrimSpace(caddy.NewReplacer().ReplaceAll(p.Provider.APISecretKey, ""))
return nil
}

Expand Down

0 comments on commit 6b466fe

Please sign in to comment.