jlentink / go-transip-dyndns

Easy update your hostname hosted with TransIP to your dynamic address.
MIT License
36 stars 3 forks source link

Could not update TXT record #10

Closed hjheins closed 2 years ago

hjheins commented 2 years ago

Hi,

(English as not-dutch speakers may also read this)

First a big thank you for this script, it is REALLY useful!

I ran into the below:

❗ Could not update the record to update @. [TXT] - template: content:1:35: executing "content" at <.IP4>: can't evaluate field IP4 in type transipClient.recordContent

my config:

[[record]] hostname = "" entry = "@" ttl = 60 type = "TXT" content = "v=spf1 a:mx a:mail. ip4:{{.IP4}} ip6:{{.IP6}} ~all"

Am I doing something wrong here, or is this a parsing issue in the code?

thanks,

Hendrik-Jan

morepurplemorebetter commented 2 years ago

The example.go-transip-dyndns.toml has the placeholders as # for other records you can use the placeholders {{.IPv4}} and {{.IPv6}}, while your code is using {{.IP4}} and {{.IP6}}.

So most likely you are just missing the v to get the correct placeholder.

hjheins commented 2 years ago

Hi @morepurplemorebetter , thank you that was it. I completele missed the "v" here. Case closed