MCPcopy
hub / github.com/caddyserver/caddy / UnmarshalCaddyfile

Method UnmarshalCaddyfile

caddytest/integration/mockdns_test.go:36–46  ·  view source on GitHub ↗

UnmarshalCaddyfile sets up the module from Caddyfile tokens.

(d *caddyfile.Dispenser)

Source from the content-addressed store, hash-verified

34
35// UnmarshalCaddyfile sets up the module from Caddyfile tokens.
36func (p *MockDNSProvider) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
37 d.Next() // consume directive name
38
39 if d.NextArg() {
40 p.Argument = d.Val()
41 }
42 if d.NextArg() {
43 return d.Errf("unexpected argument '%s'", d.Val())
44 }
45 return nil
46}
47
48// AppendRecords appends DNS records to the zone.
49func (MockDNSProvider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error) {

Callers

nothing calls this directly

Calls 4

NextArgMethod · 0.80
ValMethod · 0.80
ErrfMethod · 0.80
NextMethod · 0.65

Tested by

no test coverage detected