Repository: favonia/cloudflare-ddns
Pull request #703 (2024-03-05 14:36:23)

docs: mark new hints as 'info'

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/703?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 88.58%. Comparing base [(`a6e44fe`)](https://app.codecov.io/gh/favonia/cloudflare-ddns/commit/a6e44fe04bcabbdd0aebc62244ee9cb4a6235782?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) to head [(`d8428e1`)](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/703?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).


<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main     #703   +/-   ##
=======================================
  Coverage   88.58%   88.58%           
=======================================
  Files          48       48           
  Lines        1988     1988           
=======================================
  Hits         1761     1761           
  Misses        206      206           
  Partials       21       21           
```

| [Flag](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/703/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | Coverage Δ | |
|---|---|---|
| [unittests](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/703/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | `88.58% <100.00%> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia#carryforward-flags-in-the-pull-request-comment) to find out more.


</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/703?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).


Patch:
diff --git a/internal/api/cloudflare.go b/internal/api/cloudflare.go
index a599f5f..3b69494 100644
--- a/internal/api/cloudflare.go
+++ b/internal/api/cloudflare.go
@@ -166,9 +166,9 @@ zoneSearch:
 		}
 	}
 
-	ppfmt.Warningf(pp.EmojiError, "Failed to find the zone of %q; maybe check its spelling", domain.Describe())
+	ppfmt.Warningf(pp.EmojiError, "Failed to find the zone of %q", domain.Describe())
 	if h.accountID != "" {
-		ppfmt.Warningf(pp.EmojiHint, "Also double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank")
+		ppfmt.Infof(pp.EmojiHint, "Double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank")
 	}
 
 	return "", false


Test patch:
diff --git a/internal/api/cloudflare_test.go b/internal/api/cloudflare_test.go
index c73c790..348e981 100644
--- a/internal/api/cloudflare_test.go
+++ b/internal/api/cloudflare_test.go
@@ -382,8 +382,8 @@ func TestZoneOfDomain(t *testing.T) {
 			3, "", false,
 			func(m *mocks.MockPP) {
 				gomock.InOrder(
-					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q; maybe check its spelling", "sub.test.org"),
-					m.EXPECT().Warningf(pp.EmojiHint, "Also double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank"), //nolint:lll
+					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q", "sub.test.org"),
+					m.EXPECT().Infof(pp.EmojiHint, "Double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank"), //nolint:lll
 				)
 			},
 		},
@@ -393,8 +393,8 @@ func TestZoneOfDomain(t *testing.T) {
 			2, "", false,
 			func(m *mocks.MockPP) {
 				gomock.InOrder(
-					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q; maybe check its spelling", "*.test.org"),
-					m.EXPECT().Warningf(pp.EmojiHint, "Also double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank"), //nolint:lll
+					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q", "*.test.org"),
+					m.EXPECT().Infof(pp.EmojiHint, "Double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank"), //nolint:lll
 				)
 			},
 		},
@@ -441,8 +441,8 @@ func TestZoneOfDomain(t *testing.T) {
 			func(m *mocks.MockPP) {
 				gomock.InOrder(
 					m.EXPECT().Infof(pp.EmojiWarning, "Zone %q is %q and thus skipped", "test.org", "deleted"),
-					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q; maybe check its spelling", "test.org"),
-					m.EXPECT().Warningf(pp.EmojiHint, "Also double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank"), //nolint:lll
+					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q", "test.org"),
+					m.EXPECT().Infof(pp.EmojiHint, "Double-check the value of CF_ACCOUNT_ID; in most cases, you can leave it blank"), //nolint:lll
 				)
 			},
 		},
@@ -453,7 +453,7 @@ func TestZoneOfDomain(t *testing.T) {
 			func(m *mocks.MockPP) {
 				gomock.InOrder(
 					m.EXPECT().Infof(pp.EmojiWarning, "Zone %q is %q and thus skipped", "test.org", "deleted"),
-					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q; maybe check its spelling", "test.org"),
+					m.EXPECT().Warningf(pp.EmojiError, "Failed to find the zone of %q", "test.org"),
 				)
 			},
 		},