Skip to content

Commit

Permalink
chore(deps): bump github.com/Masterminds/sprig/v3 from 3.2.3 to 3.3.0 (
Browse files Browse the repository at this point in the history
…#127)

Bumps
[github.com/Masterminds/sprig/v3](https://github.com/Masterminds/sprig)
from 3.2.3 to 3.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Masterminds/sprig/releases">github.com/Masterminds/sprig/v3's
releases</a>.</em></p>
<blockquote>
<h2>v3.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Updating the Go versions used in testing by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/405">Masterminds/sprig#405</a></li>
<li>Change intial to initial. by <a
href="https://github.com/chrishalbert"><code>@​chrishalbert</code></a>
in <a
href="https://redirect.github.com/Masterminds/sprig/pull/391">Masterminds/sprig#391</a></li>
<li>Updating dependencies by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/404">Masterminds/sprig#404</a></li>
<li>correct value by <a
href="https://github.com/jheyduk"><code>@​jheyduk</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/376">Masterminds/sprig#376</a></li>
<li>Updating location of mergo by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/406">Masterminds/sprig#406</a></li>
<li>feature: added sha512sum function by <a
href="https://github.com/itzik-elayev"><code>@​itzik-elayev</code></a>
in <a
href="https://redirect.github.com/Masterminds/sprig/pull/400">Masterminds/sprig#400</a></li>
<li>docs: Add missing link to url functions by <a
href="https://github.com/carlpett"><code>@​carlpett</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/375">Masterminds/sprig#375</a></li>
<li>Update doc.go by <a
href="https://github.com/chey"><code>@​chey</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/369">Masterminds/sprig#369</a></li>
<li>Update mathf.md by <a
href="https://github.com/zzhu41"><code>@​zzhu41</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/290">Masterminds/sprig#290</a></li>
<li>Removing duplicate documentation by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/407">Masterminds/sprig#407</a></li>
<li>Updating the changelog for the 3.3.0 release by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/sprig/pull/408">Masterminds/sprig#408</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/chrishalbert"><code>@​chrishalbert</code></a>
made their first contribution in <a
href="https://redirect.github.com/Masterminds/sprig/pull/391">Masterminds/sprig#391</a></li>
<li><a href="https://github.com/jheyduk"><code>@​jheyduk</code></a> made
their first contribution in <a
href="https://redirect.github.com/Masterminds/sprig/pull/376">Masterminds/sprig#376</a></li>
<li><a
href="https://github.com/itzik-elayev"><code>@​itzik-elayev</code></a>
made their first contribution in <a
href="https://redirect.github.com/Masterminds/sprig/pull/400">Masterminds/sprig#400</a></li>
<li><a href="https://github.com/carlpett"><code>@​carlpett</code></a>
made their first contribution in <a
href="https://redirect.github.com/Masterminds/sprig/pull/375">Masterminds/sprig#375</a></li>
<li><a href="https://github.com/chey"><code>@​chey</code></a> made their
first contribution in <a
href="https://redirect.github.com/Masterminds/sprig/pull/369">Masterminds/sprig#369</a></li>
<li><a href="https://github.com/zzhu41"><code>@​zzhu41</code></a> made
their first contribution in <a
href="https://redirect.github.com/Masterminds/sprig/pull/290">Masterminds/sprig#290</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Masterminds/sprig/compare/v3.2.3...v3.3.0">https://github.com/Masterminds/sprig/compare/v3.2.3...v3.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Masterminds/sprig/blob/master/CHANGELOG.md">github.com/Masterminds/sprig/v3's
changelog</a>.</em></p>
<blockquote>
<h2>Release 3.3.0 (2024-08-29)</h2>
<h3>Added</h3>
<ul>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/400">#400</a>:
added sha512sum function (thanks <a
href="https://github.com/itzik-elayev"><code>@​itzik-elayev</code></a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/407">#407</a>:
Removed duplicate documentation (functions were documentated in 2
places)</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/290">#290</a>:
Corrected copy/paster oops in math documentation (thanks <a
href="https://github.com/zzhu41"><code>@​zzhu41</code></a>)</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/369">#369</a>:
Corrected template reference in docs (thanks <a
href="https://github.com/chey"><code>@​chey</code></a>)</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/375">#375</a>:
Added link to URL documenation (thanks <a
href="https://github.com/carlpett"><code>@​carlpett</code></a>)</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/406">#406</a>:
Updated the mergo dependency which had a breaking change (which was
accounted for)</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/376">#376</a>:
Fixed documentation error (thanks <a
href="https://github.com/jheyduk"><code>@​jheyduk</code></a>)</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/404">#404</a>:
Updated dependency tree</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/391">#391</a>:
Fixed misspelling (thanks <a
href="https://github.com/chrishalbert"><code>@​chrishalbert</code></a>)</li>
<li><a
href="https://redirect.github.com/Masterminds/sprig/issues/405">#405</a>:
Updated Go versions used in testing</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Masterminds/sprig/commit/e708470d529a10ac1a3f02ab6fdd339b65958372"><code>e708470</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/sprig/issues/408">#408</a>
from mattfarina/update-changelog-3.3</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/8fc4354ab4cdcdb0e18fc6626812286476209e20"><code>8fc4354</code></a>
Updating the changelog for the 3.3.0 release</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/cb81a327e35eb6ff7f1856dacf4310efb5d7f2d7"><code>cb81a32</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/sprig/issues/407">#407</a>
from mattfarina/remove-dup-math-functions</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/26376936dd279f4e1389cd772ca9132d123c9ed5"><code>2637693</code></a>
Removing duplicate documentation</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/06b9a87558bb8fc85b29a84603a9116f381283af"><code>06b9a87</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/sprig/issues/290">#290</a>
from zzhu41/patch-1</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/e663ec6019887546abdc1b4505bc382ced00cc61"><code>e663ec6</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/sprig/issues/369">#369</a>
from chey/patch-1</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/bb2f73f85f05cc0306814d56c91941b2cc80491e"><code>bb2f73f</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/sprig/issues/375">#375</a>
from carlpett/patch-1</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/f07659ea6531546e2e3c1648b63b3e7d0085f195"><code>f07659e</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/sprig/issues/400">#400</a>
from itzik-elayev/master</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/98b35c11f040f8247922ca5680d7c338d50fd8da"><code>98b35c1</code></a>
Add closing bracket</li>
<li><a
href="https://github.com/Masterminds/sprig/commit/7a88928df533ea5e7c0d3cdae521358e636a3bf8"><code>7a88928</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/sprig/issues/406">#406</a>
from mattfarina/update-mergo</li>
<li>Additional commits viewable in <a
href="https://github.com/Masterminds/sprig/compare/v3.2.3...v3.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/Masterminds/sprig/v3&package-manager=go_modules&previous-version=3.2.3&new-version=3.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Sep 3, 2024
1 parent af0cff5 commit 08ba7d5
Show file tree
Hide file tree
Showing 123 changed files with 2,851 additions and 645 deletions.
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/launchdarkly/find-code-references-in-pull-request
go 1.20

require (
github.com/Masterminds/sprig/v3 v3.2.3
github.com/Masterminds/sprig/v3 v3.3.0
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00
Expand All @@ -20,6 +20,7 @@ require (
)

require (
dario.cat/mergo v1.0.1 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
Expand All @@ -30,44 +31,43 @@ require (

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/kyoh86/xdg v1.2.0 // indirect
github.com/launchdarkly/api-client-go/v15 v15.1.0
github.com/launchdarkly/json-patch v0.0.0-20180720210516-dd68d883319f // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/petar-dambovaliev/aho-corasick v0.0.0-20211021192214-5ab2d9280aa9 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/wacul/ptr v1.0.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
77 changes: 26 additions & 51 deletions go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ name = "go"
enabled = true

[analyzers.meta]
import_path = "github.com/imdario/mergo"
import_path = "dario.cat/mergo"
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Golang/Intellij
.idea

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Mergo

[![GoDoc][3]][4]
[![GitHub release][5]][6]
[![GoCard][7]][8]
[![Build Status][1]][2]
[![Coverage Status][9]][10]
[![Test status][1]][2]
[![OpenSSF Scorecard][21]][22]
[![OpenSSF Best Practices][19]][20]
[![Coverage status][9]][10]
[![Sourcegraph][11]][12]
[![FOSSA Status][13]][14]
[![FOSSA status][13]][14]

[![GoDoc][3]][4]
[![Become my sponsor][15]][16]
[![Tidelift][17]][18]

[1]: https://travis-ci.org/imdario/mergo.png
[2]: https://travis-ci.org/imdario/mergo
[1]: https://github.com/imdario/mergo/workflows/tests/badge.svg?branch=master
[2]: https://github.com/imdario/mergo/actions/workflows/tests.yml
[3]: https://godoc.org/github.com/imdario/mergo?status.svg
[4]: https://godoc.org/github.com/imdario/mergo
[5]: https://img.shields.io/github/release/imdario/mergo.svg
Expand All @@ -28,6 +31,10 @@
[16]: https://github.com/sponsors/imdario
[17]: https://tidelift.com/badges/package/go/github.com%2Fimdario%2Fmergo
[18]: https://tidelift.com/subscription/pkg/go-github.com-imdario-mergo
[19]: https://bestpractices.coreinfrastructure.org/projects/7177/badge
[20]: https://bestpractices.coreinfrastructure.org/projects/7177
[21]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo/badge
[22]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo

A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements.

Expand All @@ -37,77 +44,60 @@ Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the

## Status

It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, Microsoft, etc](https://github.com/imdario/mergo#mergo-in-the-wild).
Mergo is stable and frozen, ready for production. Check a short list of the projects using at large scale it [here](https://github.com/imdario/mergo#mergo-in-the-wild).

No new features are accepted. They will be considered for a future v2 that improves the implementation and fixes bugs for corner cases.

### Important notes

### Important note
#### 1.0.0

In [1.0.0](//github.com/imdario/mergo/releases/tag/1.0.0) Mergo moves to a vanity URL `dario.cat/mergo`. No more v1 versions will be released.

If the vanity URL is causing issues in your project due to a dependency pulling Mergo - it isn't a direct dependency in your project - it is recommended to use [replace](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive) to pin the version to the last one with the old import URL:

```
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16
```

#### 0.3.9

Please keep in mind that a problematic PR broke [0.3.9](//github.com/imdario/mergo/releases/tag/0.3.9). I reverted it in [0.3.10](//github.com/imdario/mergo/releases/tag/0.3.10), and I consider it stable but not bug-free. Also, this version adds support for go modules.

Keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2), Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). I added an optional/variadic argument so that it won't break the existing code.

If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0).
If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u dario.cat/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0).

### Donations

If Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes:

<a href='https://ko-fi.com/B0B58839' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
<a href="https://liberapay.com/dario/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
<a href='https://github.com/sponsors/imdario' target='_blank'><img alt="Become my sponsor" src="https://img.shields.io/github/sponsors/imdario?style=for-the-badge" /></a>

### Mergo in the wild

- [moby/moby](https://github.com/moby/moby)
- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes)
- [vmware/dispatch](https://github.com/vmware/dispatch)
- [Shopify/themekit](https://github.com/Shopify/themekit)
- [imdario/zas](https://github.com/imdario/zas)
- [matcornic/hermes](https://github.com/matcornic/hermes)
- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go)
- [kataras/iris](https://github.com/kataras/iris)
- [michaelsauter/crane](https://github.com/michaelsauter/crane)
- [go-task/task](https://github.com/go-task/task)
- [sensu/uchiwa](https://github.com/sensu/uchiwa)
- [ory/hydra](https://github.com/ory/hydra)
- [sisatech/vcli](https://github.com/sisatech/vcli)
- [dairycart/dairycart](https://github.com/dairycart/dairycart)
- [projectcalico/felix](https://github.com/projectcalico/felix)
- [resin-os/balena](https://github.com/resin-os/balena)
- [go-kivik/kivik](https://github.com/go-kivik/kivik)
- [Telefonica/govice](https://github.com/Telefonica/govice)
- [supergiant/supergiant](supergiant/supergiant)
- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce)
- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy)
- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel)
- [EagerIO/Stout](https://github.com/EagerIO/Stout)
- [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api)
- [russross/canvasassignments](https://github.com/russross/canvasassignments)
- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api)
- [casualjim/exeggutor](https://github.com/casualjim/exeggutor)
- [divshot/gitling](https://github.com/divshot/gitling)
- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl)
- [andrerocker/deploy42](https://github.com/andrerocker/deploy42)
- [elwinar/rambler](https://github.com/elwinar/rambler)
- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman)
- [jfbus/impressionist](https://github.com/jfbus/impressionist)
- [Jmeyering/zealot](https://github.com/Jmeyering/zealot)
- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host)
- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go)
- [thoas/picfit](https://github.com/thoas/picfit)
- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server)
- [jnuthong/item_search](https://github.com/jnuthong/item_search)
- [bukalapak/snowboard](https://github.com/bukalapak/snowboard)
- [containerssh/containerssh](https://github.com/containerssh/containerssh)
- [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser)
- [tjpnz/structbot](https://github.com/tjpnz/structbot)
Mergo is used by [thousands](https://deps.dev/go/dario.cat%2Fmergo/v1.0.0/dependents) [of](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.16/dependents) [projects](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.12), including:

* [containerd/containerd](https://github.com/containerd/containerd)
* [datadog/datadog-agent](https://github.com/datadog/datadog-agent)
* [docker/cli/](https://github.com/docker/cli/)
* [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser)
* [go-micro/go-micro](https://github.com/go-micro/go-micro)
* [grafana/loki](https://github.com/grafana/loki)
* [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes)
* [masterminds/sprig](github.com/Masterminds/sprig)
* [moby/moby](https://github.com/moby/moby)
* [slackhq/nebula](https://github.com/slackhq/nebula)
* [volcano-sh/volcano](https://github.com/volcano-sh/volcano)

## Install

go get github.com/imdario/mergo
go get dario.cat/mergo

// use in your .go code
import (
"github.com/imdario/mergo"
"dario.cat/mergo"
)

## Usage
Expand All @@ -128,6 +118,39 @@ if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil {
}
```

If you need to override pointers, so the source pointer's value is assigned to the destination's pointer, you must use `WithoutDereference`:

```go
package main

import (
"fmt"

"dario.cat/mergo"
)

type Foo struct {
A *string
B int64
}

func main() {
first := "first"
second := "second"
src := Foo{
A: &first,
B: 2,
}

dest := Foo{
A: &second,
B: 1,
}

mergo.Merge(&dest, src, mergo.WithOverride, mergo.WithoutDereference)
}
```

Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field.

```go
Expand All @@ -145,7 +168,7 @@ package main

import (
"fmt"
"github.com/imdario/mergo"
"dario.cat/mergo"
)

type Foo struct {
Expand Down Expand Up @@ -181,9 +204,9 @@ package main

import (
"fmt"
"github.com/imdario/mergo"
"reflect"
"time"
"dario.cat/mergo"
"reflect"
"time"
)

type timeTransformer struct {
Expand Down Expand Up @@ -232,5 +255,4 @@ Written by [Dario Castañé](http://dario.im).

[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE).


[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_large)
File renamed without changes.
Loading

0 comments on commit 08ba7d5

Please sign in to comment.