Repository: crazy-max/diun
Pull request #214 (2020-11-09 07:56:43)

Bump github.com/crazy-max/gonfig from 0.3.0 to 0.4.0
Bumps [github.com/crazy-max/gonfig](https://github.com/crazy-max/gonfig) from 0.3.0 to 0.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/crazy-max/gonfig/releases">github.com/crazy-max/gonfig's releases</a>.</em></p>
<blockquote>
<h2>v0.4.0</h2>
<ul>
<li>Handle raw values</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/crazy-max/gonfig/blob/master/CHANGELOG.md">github.com/crazy-max/gonfig's changelog</a>.</em></p>
<blockquote>
<h2>0.4.0 (2020/11/08)</h2>
<ul>
<li>Handle raw values</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/crazy-max/gonfig/commit/ba7506e08e107ed3de57339423a490d9fd83f606"><code>ba7506e</code></a> Handle raw values</li>
<li><a href="https://github.com/crazy-max/gonfig/commit/214de2668c6e5f71055b942eef0df7684df20539"><code>214de26</code></a> Use major version of actions</li>
<li><a href="https://github.com/crazy-max/gonfig/commit/5333208aeebbd7d34f4a3e3f402dc25b140282bb"><code>5333208</code></a> Bump codecov/codecov-action from v1.0.13 to v1.0.14 (<a href="https://github-redirect.dependabot.com/crazy-max/gonfig/issues/10">#10</a>)</li>
<li><a href="https://github.com/crazy-max/gonfig/commit/4d05f417a8fa44aab1478cec37649acc3f895f6f"><code>4d05f41</code></a> Bump crazy-max/ghaction-github-labeler from v3.0.0 to v3.1.0 (<a href="https://github-redirect.dependabot.com/crazy-max/gonfig/issues/9">#9</a>)</li>
<li><a href="https://github.com/crazy-max/gonfig/commit/5c76bb311b0835a7383cd085e6ff495f07572683"><code>5c76bb3</code></a> Update labels workflow</li>
<li><a href="https://github.com/crazy-max/gonfig/commit/8a5dd8c295d7f514b277299034700dbf78e4ed3c"><code>8a5dd8c</code></a> Bump codecov/codecov-action from v1.0.12 to v1.0.13 (<a href="https://github-redirect.dependabot.com/crazy-max/gonfig/issues/7">#7</a>)</li>
<li><a href="https://github.com/crazy-max/gonfig/commit/81e6b99dee3e4cdd2392d67bba7d0a1ab3015ac6"><code>81e6b99</code></a> Add godev workflow</li>
<li>See full diff in <a href="https://github.com/crazy-max/gonfig/compare/v0.3.0...v0.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/crazy-max/gonfig&package-manager=go_modules&previous-version=0.3.0&new-version=0.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually


</details>

codecov[bot]: # [Codecov](https://codecov.io/gh/crazy-max/diun/pull/214?src=pr&el=h1) Report
> Merging [#214](https://codecov.io/gh/crazy-max/diun/pull/214?src=pr&el=desc) (34b8cc6) into [master](https://codecov.io/gh/crazy-max/diun/commit/cab5df2ead0d51639f8a9312175fc0b576c78f2b?el=desc) (cab5df2) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/crazy-max/diun/pull/214/graphs/tree.svg?width=650&height=150&src=pr&token=phc5KYIjsV)](https://codecov.io/gh/crazy-max/diun/pull/214?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #214   +/-   ##
=======================================
  Coverage   70.33%   70.33%           
=======================================
  Files           7        7           
  Lines         236      236           
=======================================
  Hits          166      166           
  Misses         44       44           
  Partials       26       26           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/crazy-max/diun/pull/214?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/crazy-max/diun/pull/214?src=pr&el=footer). Last update [cab5df2...34b8cc6](https://codecov.io/gh/crazy-max/diun/pull/214?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/go.mod b/go.mod
index 12dab8f7..79b3787e 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ require (
 	github.com/alecthomas/kong v0.2.11
 	github.com/containers/image/v5 v5.7.0
 	github.com/crazy-max/gohealthchecks v0.2.0
-	github.com/crazy-max/gonfig v0.3.0
+	github.com/crazy-max/gonfig v0.4.0
 	github.com/docker/docker v1.4.2-0.20200204220554-5f6d6f3f2203
 	github.com/docker/go-connections v0.4.0
 	github.com/eclipse/paho.mqtt.golang v1.2.0
diff --git a/go.sum b/go.sum
index bdd7da39..c46b3563 100644
--- a/go.sum
+++ b/go.sum
@@ -88,8 +88,8 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+
 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
 github.com/crazy-max/gohealthchecks v0.2.0 h1:r+L9PuTwq+EpmzffDrLvxk7Ps+SVU+f2T5JHvfAHbv0=
 github.com/crazy-max/gohealthchecks v0.2.0/go.mod h1:3DB7UfVoI5njYSAyqKkrBuBjf5OlmzjJZ1BlKC5+nWE=
-github.com/crazy-max/gonfig v0.3.0 h1:/HFdLQjXSNhImgeQgD2eXhc5svX4PhUkGSbl4fJRp4s=
-github.com/crazy-max/gonfig v0.3.0/go.mod h1:7vmzltkoa1RHpGB5fTom0ebnqelHdd7fzhtXTi8sVoQ=
+github.com/crazy-max/gonfig v0.4.0 h1:/PqxAatdrcaKyCZ+a6w7Ox68uZXVqCI36wUzYVfq3Y0=
+github.com/crazy-max/gonfig v0.4.0/go.mod h1:7vmzltkoa1RHpGB5fTom0ebnqelHdd7fzhtXTi8sVoQ=
 github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=


Test patch:
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index a4769959..cc04acb2 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -512,10 +512,10 @@ func TestValidation(t *testing.T) {
 			cfg, err := config.Load(tt.cli)
 			require.NoError(t, err)
 
-			dec, err := env.Encode(cfg)
+			dec, err := env.Encode("DIUN_", cfg)
 			require.NoError(t, err)
 			for _, value := range dec {
-				fmt.Println(fmt.Sprintf(`%s=%s`, strings.Replace(value.Name, "GONFIG_", "DIUN_", 1), value.Default))
+				fmt.Println(fmt.Sprintf(`%s=%s`, value.Name, value.Default))
 			}
 		})
 	}