[PR #512] [MERGED] Include ipversion in string representation of all providers #721

Closed
opened 2025-11-20 04:25:50 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qdm12/ddns-updater/pull/512
Author: @felixwrt
Created: 8/3/2023
Status: Merged
Merged: 8/8/2023
Merged by: @qdm12

Base: masterHead: strato_ipversion


📝 Commits (2)

  • fc8e3f9 Include ipversion in string representation of Strato Provider
  • becdbc8 Use utils.ToString for all providers

📊 Changes

11 files changed (+14 additions, -11 deletions)

View changed files

📝 internal/provider/providers/desec/provider.go (+1 -1)
📝 internal/provider/providers/dyn/provider.go (+1 -1)
📝 internal/provider/providers/dynv6/provider.go (+2 -1)
📝 internal/provider/providers/inwx/provider.go (+2 -1)
📝 internal/provider/providers/opendns/provider.go (+2 -1)
📝 internal/provider/providers/ovh/provider.go (+1 -1)
📝 internal/provider/providers/porkbun/provider.go (+1 -1)
📝 internal/provider/providers/selfhostde/provider.go (+1 -1)
📝 internal/provider/providers/spdyn/provider.go (+1 -1)
📝 internal/provider/providers/strato/provider.go (+1 -1)
📝 internal/provider/providers/variomedia/provider.go (+1 -1)

📄 Description

I'm using two providers (cloudflare and strato) and noticed that for strato, the logs don't show the configured IP version(s). This PR changes the string representation of the Strato provider to include the ip version:

Before:

ddns-updater  | 2023-07-19T08:27:42Z INFO Updating record [domain: mydomain.com | host: @ | provider: Strato] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:32:41Z INFO Updating record [domain: anotherdomain.com | host: @ | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091

After:

ddns-updater  | 2023-07-19T08:27:42Z INFO Updating record [domain: mydomain.com | host: @ | provider: strato | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:32:41Z INFO Updating record [domain: anotherdomain.com | host: @ | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091

I noticed that out of the 40 providers 30 use utils.ToString and 10 (still?) use fmt.Sprintf("[domain: %s .... I can change the remaining 9 as well if you want.

Let me know what you think.

BTW: This is the first time I've worked with Go and the Devcontainer made it super easy to get started. Thanks for providing that, it makes a big difference in the required effort to get set up!

Edit: Changed the string representation of all providers to include the ipversion


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qdm12/ddns-updater/pull/512 **Author:** [@felixwrt](https://github.com/felixwrt) **Created:** 8/3/2023 **Status:** ✅ Merged **Merged:** 8/8/2023 **Merged by:** [@qdm12](https://github.com/qdm12) **Base:** `master` ← **Head:** `strato_ipversion` --- ### 📝 Commits (2) - [`fc8e3f9`](https://github.com/qdm12/ddns-updater/commit/fc8e3f9d8348ad54fd9bae15d472afa26ae4b47b) Include ipversion in string representation of Strato Provider - [`becdbc8`](https://github.com/qdm12/ddns-updater/commit/becdbc8d9302637f82fbec7cc3643a8143020c20) Use `utils.ToString` for all providers ### 📊 Changes **11 files changed** (+14 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `internal/provider/providers/desec/provider.go` (+1 -1) 📝 `internal/provider/providers/dyn/provider.go` (+1 -1) 📝 `internal/provider/providers/dynv6/provider.go` (+2 -1) 📝 `internal/provider/providers/inwx/provider.go` (+2 -1) 📝 `internal/provider/providers/opendns/provider.go` (+2 -1) 📝 `internal/provider/providers/ovh/provider.go` (+1 -1) 📝 `internal/provider/providers/porkbun/provider.go` (+1 -1) 📝 `internal/provider/providers/selfhostde/provider.go` (+1 -1) 📝 `internal/provider/providers/spdyn/provider.go` (+1 -1) 📝 `internal/provider/providers/strato/provider.go` (+1 -1) 📝 `internal/provider/providers/variomedia/provider.go` (+1 -1) </details> ### 📄 Description I'm using two providers (cloudflare and strato) and noticed that for strato, the logs don't show the configured IP version(s). This PR changes the string representation of the Strato provider to include the ip version: Before: ``` ddns-updater | 2023-07-19T08:27:42Z INFO Updating record [domain: mydomain.com | host: @ | provider: Strato] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091 ddns-updater | 2023-07-19T08:32:41Z INFO Updating record [domain: anotherdomain.com | host: @ | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091 ``` After: ``` ddns-updater | 2023-07-19T08:27:42Z INFO Updating record [domain: mydomain.com | host: @ | provider: strato | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091 ddns-updater | 2023-07-19T08:32:41Z INFO Updating record [domain: anotherdomain.com | host: @ | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091 ``` I noticed that out of the 40 providers 30 use `utils.ToString` and 10 (still?) use `fmt.Sprintf("[domain: %s ...`. I can change the remaining 9 as well if you want. Let me know what you think. BTW: This is the first time I've worked with Go and the Devcontainer made it super easy to get started. Thanks for providing that, it makes a big difference in the required effort to get set up! Edit: Changed the string representation of all providers to include the ipversion --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:25:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#721