New Upstream Release - golang-github-imdario-mergo

Ready changes

Summary

Merged new upstream version: 1.0.0 (was: 0.3.12).

Diff

diff --git a/.deepsource.toml b/.deepsource.toml
index 8a0681a..a8bc979 100644
--- a/.deepsource.toml
+++ b/.deepsource.toml
@@ -9,4 +9,4 @@ name = "go"
 enabled = true
 
   [analyzers.meta]
-  import_path = "github.com/imdario/mergo"
\ No newline at end of file
+  import_path = "dario.cat/mergo"
\ No newline at end of file
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 2aea4d6..3de9fb6 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -2,4 +2,3 @@
 
 github: imdario
 ko_fi: dariocc
-custom: https://beerpay.io/imdario/mergo
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..e0871f9
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+  - package-ecosystem: "gomod" # See documentation for possible values
+    directory: "/" # Location of package manifests
+    schedule:
+      interval: "weekly"
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..239bb4e
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,72 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    # The branches below must be a subset of the branches above
+    branches: [ master ]
+  schedule:
+    - cron: '43 19 * * 2'
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'go' ]
+        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+        # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v3
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v2
+      with:
+        languages: ${{ matrix.language }}
+        # If you wish to specify custom queries, you can do so here or in a config file.
+        # By default, queries listed here will override any specified in a config file.
+        # Prefix the list here with "+" to use these queries and those in the config file.
+        
+        # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+        # queries: security-extended,security-and-quality
+
+        
+    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
+    # If this step fails, then you should remove it and run the build manually (see below)
+    - name: Autobuild
+      uses: github/codeql-action/autobuild@v2
+
+    # ℹ️ Command-line programs to run using the OS shell.
+    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
+
+    #   If the Autobuild fails above, remove it and uncomment the following three lines. 
+    #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
+
+    # - run: |
+    #   echo "Run, Build Application using script"
+    #   ./location_of_script_within_repo/buildscript.sh
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/openssf.yml b/.github/workflows/openssf.yml
new file mode 100644
index 0000000..6844919
--- /dev/null
+++ b/.github/workflows/openssf.yml
@@ -0,0 +1,18 @@
+name: 'openssf'
+on:
+  push:
+    branches:
+      - master
+jobs:
+  scorecard:
+    runs-on: ubuntu-latest
+    name: OpenSSF
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v3
+      - name: OSSF Scorecard action
+        uses: ossf/scorecard-action@v2.1.3
+        with:
+          results_file: results.sarif
+          results_format: sarif
+          publish_results: true
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..d0ed5ed
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,18 @@
+name: 'tests'
+on:
+  push:
+    branches:
+      - master
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - name: Set up Go
+        uses: actions/setup-go@v4
+        with:
+          go-version: '>=1.17.0'
+      - name: Build
+        run: go build -v ./...
+      - name: Test
+        run: go test -v ./...
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..0a1ff9f
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,112 @@
+<!-- omit in toc -->
+# Contributing to mergo
+
+First off, thanks for taking the time to contribute! ❤️
+
+All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
+
+> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
+> - Star the project
+> - Tweet about it
+> - Refer this project in your project's readme
+> - Mention the project at local meetups and tell your friends/colleagues
+
+<!-- omit in toc -->
+## Table of Contents
+
+- [Code of Conduct](#code-of-conduct)
+- [I Have a Question](#i-have-a-question)
+- [I Want To Contribute](#i-want-to-contribute)
+- [Reporting Bugs](#reporting-bugs)
+- [Suggesting Enhancements](#suggesting-enhancements)
+
+## Code of Conduct
+
+This project and everyone participating in it is governed by the
+[mergo Code of Conduct](https://github.com/imdario/mergoblob/master/CODE_OF_CONDUCT.md).
+By participating, you are expected to uphold this code. Please report unacceptable behavior
+to <>.
+
+
+## I Have a Question
+
+> If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/imdario/mergo).
+
+Before you ask a question, it is best to search for existing [Issues](https://github.com/imdario/mergo/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
+
+If you then still feel the need to ask a question and need clarification, we recommend the following:
+
+- Open an [Issue](https://github.com/imdario/mergo/issues/new).
+- Provide as much context as you can about what you're running into.
+- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
+
+We will then take care of the issue as soon as possible.
+
+## I Want To Contribute
+
+> ### Legal Notice <!-- omit in toc -->
+> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
+
+### Reporting Bugs
+
+<!-- omit in toc -->
+#### Before Submitting a Bug Report
+
+A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
+
+- Make sure that you are using the latest version.
+- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)).
+- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/imdario/mergoissues?q=label%3Abug).
+- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
+- Collect information about the bug:
+- Stack trace (Traceback)
+- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
+- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
+- Possibly your input and the output
+- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
+
+<!-- omit in toc -->
+#### How Do I Submit a Good Bug Report?
+
+> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to .
+<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
+
+We use GitHub issues to track bugs and errors. If you run into an issue with the project:
+
+- Open an [Issue](https://github.com/imdario/mergo/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
+- Explain the behavior you would expect and the actual behavior.
+- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
+- Provide the information you collected in the previous section.
+
+Once it's filed:
+
+- The project team will label the issue accordingly.
+- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be implemented by someone.
+
+### Suggesting Enhancements
+
+This section guides you through submitting an enhancement suggestion for mergo, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
+
+<!-- omit in toc -->
+#### Before Submitting an Enhancement
+
+- Make sure that you are using the latest version.
+- Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration.
+- Perform a [search](https://github.com/imdario/mergo/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
+- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
+
+<!-- omit in toc -->
+#### How Do I Submit a Good Enhancement Suggestion?
+
+Enhancement suggestions are tracked as [GitHub issues](https://github.com/imdario/mergo/issues).
+
+- Use a **clear and descriptive title** for the issue to identify the suggestion.
+- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
+- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
+- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
+- **Explain why this enhancement would be useful** to most mergo users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
+
+<!-- omit in toc -->
+## Attribution
+This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
diff --git a/README.md b/README.md
index aa8cbd7..7d0cf9f 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +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]
 
-[![GoCenter Kudos][15]][16]
+[![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
@@ -25,8 +27,14 @@
 [12]: https://sourcegraph.com/github.com/imdario/mergo?badge
 [13]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=shield
 [14]: https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield
-[15]: https://search.gocenter.io/api/ui/badge/github.com%2Fimdario%2Fmergo
-[16]: https://search.gocenter.io/github.com/imdario/mergo
+[15]: https://img.shields.io/github/sponsors/imdario
+[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.
 
@@ -36,24 +44,29 @@ 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, etc](https://github.com/imdario/mergo#mergo-in-the-wild).
+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).
+
+### Important notes
+
+#### 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`.
 
-### Important note
+#### 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 suppot for go modules.
+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>
-[![Beerpay](https://beerpay.io/imdario/mergo/badge.svg)](https://beerpay.io/imdario/mergo)
-[![Beerpay](https://beerpay.io/imdario/mergo/make-wish.svg)](https://beerpay.io/imdario/mergo)
 <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
 
@@ -98,14 +111,16 @@ If Mergo is useful to you, consider buying me a coffee, a beer, or making a mont
 - [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)
 
 ## 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
@@ -143,7 +158,7 @@ package main
 
 import (
 	"fmt"
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type Foo struct {
@@ -168,7 +183,7 @@ func main() {
 
 Note: if test are failing due missing package, please execute:
 
-    go get gopkg.in/yaml.v2
+    go get gopkg.in/yaml.v3
 
 ### Transformers
 
@@ -179,9 +194,9 @@ package main
 
 import (
 	"fmt"
-	"github.com/imdario/mergo"
-        "reflect"
-        "time"
+	"dario.cat/mergo"
+    "reflect"
+    "time"
 )
 
 type timeTransformer struct {
@@ -218,7 +233,6 @@ func main() {
 }
 ```
 
-
 ## Contact me
 
 If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario)
@@ -227,21 +241,8 @@ If I can help you, you have an idea or you are using Mergo in your projects, don
 
 Written by [Dario Castañé](http://dario.im).
 
-## Top Contributors
-
-[![0](https://sourcerer.io/fame/imdario/imdario/mergo/images/0)](https://sourcerer.io/fame/imdario/imdario/mergo/links/0)
-[![1](https://sourcerer.io/fame/imdario/imdario/mergo/images/1)](https://sourcerer.io/fame/imdario/imdario/mergo/links/1)
-[![2](https://sourcerer.io/fame/imdario/imdario/mergo/images/2)](https://sourcerer.io/fame/imdario/imdario/mergo/links/2)
-[![3](https://sourcerer.io/fame/imdario/imdario/mergo/images/3)](https://sourcerer.io/fame/imdario/imdario/mergo/links/3)
-[![4](https://sourcerer.io/fame/imdario/imdario/mergo/images/4)](https://sourcerer.io/fame/imdario/imdario/mergo/links/4)
-[![5](https://sourcerer.io/fame/imdario/imdario/mergo/images/5)](https://sourcerer.io/fame/imdario/imdario/mergo/links/5)
-[![6](https://sourcerer.io/fame/imdario/imdario/mergo/images/6)](https://sourcerer.io/fame/imdario/imdario/mergo/links/6)
-[![7](https://sourcerer.io/fame/imdario/imdario/mergo/images/7)](https://sourcerer.io/fame/imdario/imdario/mergo/links/7)
-
-
 ## License
 
 [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)
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..a5de61f
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,14 @@
+# Security Policy
+
+## Supported Versions
+
+| Version | Supported          |
+| ------- | ------------------ |
+| 0.3.x   | :white_check_mark: |
+| < 0.3   | :x:                |
+
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
diff --git a/debian/changelog b/debian/changelog
index 53a0074..7820d65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-imdario-mergo (1.0.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 08 Jul 2023 19:19:42 -0000
+
 golang-github-imdario-mergo (0.3.12-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/doc.go b/doc.go
index fcd985f..7d96ec0 100644
--- a/doc.go
+++ b/doc.go
@@ -8,30 +8,36 @@ A helper to merge structs and maps in Golang. Useful for configuration default v
 
 Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection).
 
-Status
+# Status
 
 It is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc.
 
-Important note
+# Important notes
+
+1.0.0
+
+In 1.0.0 Mergo moves to a vanity URL `dario.cat/mergo`.
+
+0.3.9
 
 Please keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules.
 
 Keep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to support transformers. We 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).
 
-Install
+# Install
 
 Do your usual installation procedure:
 
-    go get github.com/imdario/mergo
+	go get dario.cat/mergo
 
-    // use in your .go code
-    import (
-        "github.com/imdario/mergo"
-    )
+	// use in your .go code
+	import (
+	    "dario.cat/mergo"
+	)
 
-Usage
+# Usage
 
 You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection).
 
@@ -59,7 +65,7 @@ Here is a nice example:
 
 	import (
 		"fmt"
-		"github.com/imdario/mergo"
+		"dario.cat/mergo"
 	)
 
 	type Foo struct {
@@ -81,7 +87,7 @@ Here is a nice example:
 		// {two 2}
 	}
 
-Transformers
+# Transformers
 
 Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time?
 
@@ -89,9 +95,9 @@ Transformers allow to merge specific types differently than in the default behav
 
 	import (
 		"fmt"
-		"github.com/imdario/mergo"
-			"reflect"
-			"time"
+		"dario.cat/mergo"
+		"reflect"
+		"time"
 	)
 
 	type timeTransformer struct {
@@ -127,17 +133,16 @@ Transformers allow to merge specific types differently than in the default behav
 		// { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 }
 	}
 
-Contact me
+# Contact me
 
 If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario
 
-About
+# About
 
 Written by Dario Castañé: https://da.rio.hn
 
-License
+# License
 
 BSD 3-Clause license, as Go language.
-
 */
 package mergo
diff --git a/go.mod b/go.mod
index 3d689d9..21f2faa 100644
--- a/go.mod
+++ b/go.mod
@@ -1,5 +1,5 @@
-module github.com/imdario/mergo
+module dario.cat/mergo
 
 go 1.13
 
-require gopkg.in/yaml.v2 v2.3.0
+require gopkg.in/yaml.v3 v3.0.1
diff --git a/go.sum b/go.sum
index 168980d..a62c313 100644
--- a/go.sum
+++ b/go.sum
@@ -1,4 +1,4 @@
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/issue100_test.go b/issue100_test.go
index 039123a..51b8949 100644
--- a/issue100_test.go
+++ b/issue100_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type issue100s struct {
diff --git a/issue104_test.go b/issue104_test.go
index c07e5a8..fe353ea 100644
--- a/issue104_test.go
+++ b/issue104_test.go
@@ -4,7 +4,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type Record struct {
diff --git a/issue121_test.go b/issue121_test.go
index 0f36efd..04d1db4 100644
--- a/issue121_test.go
+++ b/issue121_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestIssue121WithSliceDeepCopy(t *testing.T) {
diff --git a/issue123_test.go b/issue123_test.go
index ae62d7b..f1cb1e4 100644
--- a/issue123_test.go
+++ b/issue123_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestIssue123(t *testing.T) {
@@ -23,20 +23,20 @@ func TestIssue123(t *testing.T) {
 		t.Fatal(err)
 	}
 	testCases := []struct {
-		key      string
 		expected interface{}
+		key      string
 	}{
 		{
-			"col1",
 			nil,
+			"col1",
 		},
 		{
-			"col2",
 			4,
+			"col2",
 		},
 		{
-			"col3",
 			nil,
+			"col3",
 		},
 	}
 	for _, tC := range testCases {
diff --git a/issue125_test.go b/issue125_test.go
index 4e5cb63..c9258e9 100644
--- a/issue125_test.go
+++ b/issue125_test.go
@@ -4,7 +4,7 @@ import (
 	"encoding/json"
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type settings struct {
diff --git a/issue129_test.go b/issue129_test.go
index 3a1c691..ad20c75 100644
--- a/issue129_test.go
+++ b/issue129_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestIssue129Boolean(t *testing.T) {
diff --git a/issue131_test.go b/issue131_test.go
index 5ca24cf..a702063 100644
--- a/issue131_test.go
+++ b/issue131_test.go
@@ -3,12 +3,15 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type foz struct {
 	A *bool
 	B string
+	C *bool
+	D *bool
+	E *bool
 }
 
 func TestIssue131MergeWithOverwriteWithEmptyValue(t *testing.T) {
@@ -30,3 +33,73 @@ func TestIssue131MergeWithOverwriteWithEmptyValue(t *testing.T) {
 		t.Errorf("dest.B not merged in properly: %v != %v", src.B, dest.B)
 	}
 }
+
+func TestIssue131MergeWithoutDereferenceWithOverride(t *testing.T) {
+	src := foz{
+		A: func(v bool) *bool { return &v }(false),
+		B: "src",
+		C: nil,
+		D: func(v bool) *bool { return &v }(false),
+		E: func(v bool) *bool { return &v }(true),
+	}
+	dest := foz{
+		A: func(v bool) *bool { return &v }(true),
+		B: "dest",
+		C: func(v bool) *bool { return &v }(false),
+		D: nil,
+		E: func(v bool) *bool { return &v }(false),
+	}
+	if err := mergo.Merge(&dest, src, mergo.WithoutDereference, mergo.WithOverride); err != nil {
+		t.Error(err)
+	}
+	if *src.A != *dest.A {
+		t.Errorf("dest.A not merged in properly: %v != %v", *src.A, *dest.A)
+	}
+	if src.B != dest.B {
+		t.Errorf("dest.B not merged in properly: %v != %v", src.B, dest.B)
+	}
+	if *dest.C != false {
+		t.Errorf("dest.C not merged in properly: %v != %v", *src.C, *dest.C)
+	}
+	if *dest.D != false {
+		t.Errorf("dest.D not merged in properly: %v != %v", src.D, *dest.D)
+	}
+	if *dest.E != true {
+		t.Errorf("dest.E not merged in properly: %v != %v", *src.E, *dest.E)
+	}
+}
+
+func TestIssue131MergeWithoutDereference(t *testing.T) {
+	src := foz{
+		A: func(v bool) *bool { return &v }(false),
+		B: "src",
+		C: nil,
+		D: func(v bool) *bool { return &v }(false),
+		E: func(v bool) *bool { return &v }(true),
+	}
+	dest := foz{
+		A: func(v bool) *bool { return &v }(true),
+		B: "dest",
+		C: func(v bool) *bool { return &v }(false),
+		D: nil,
+		E: func(v bool) *bool { return &v }(false),
+	}
+	if err := mergo.Merge(&dest, src, mergo.WithoutDereference); err != nil {
+		t.Error(err)
+	}
+	if *src.A == *dest.A {
+		t.Errorf("dest.A should not have been merged: %v == %v", *src.A, *dest.A)
+	}
+	if src.B == dest.B {
+		t.Errorf("dest.B should not have been merged: %v == %v", src.B, dest.B)
+	}
+	if *dest.C != false {
+		t.Errorf("dest.C not merged in properly: %v != %v", *src.C, *dest.C)
+	}
+	if *dest.D != false {
+		t.Errorf("dest.D not merged in properly: %v != %v", src.D, *dest.D)
+	}
+	if *dest.E == true {
+		t.Errorf("dest.Eshould not have been merged: %v == %v", *src.E, *dest.E)
+	}
+}
diff --git a/issue136_test.go b/issue136_test.go
index 4fe81c7..2acab78 100644
--- a/issue136_test.go
+++ b/issue136_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type embeddedTestA struct {
@@ -12,8 +12,8 @@ type embeddedTestA struct {
 }
 
 type embeddedTestB struct {
-	embeddedTestA
 	Address string
+	embeddedTestA
 }
 
 func TestMergeEmbedded(t *testing.T) {
diff --git a/issue138_test.go b/issue138_test.go
index 70d7b29..843e590 100644
--- a/issue138_test.go
+++ b/issue138_test.go
@@ -4,7 +4,7 @@ import (
 	"encoding/json"
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 const issue138configuration string = `
diff --git a/issue143_test.go b/issue143_test.go
index 8cca4d8..d8a451d 100644
--- a/issue143_test.go
+++ b/issue143_test.go
@@ -4,13 +4,13 @@ import (
 	"fmt"
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestIssue143(t *testing.T) {
 	testCases := []struct {
-		options  []func(*mergo.Config)
 		expected func(map[string]interface{}) error
+		options  []func(*mergo.Config)
 	}{
 		{
 			options: []func(*mergo.Config){mergo.WithOverride},
diff --git a/issue149_test.go b/issue149_test.go
index b6857c9..79cd351 100644
--- a/issue149_test.go
+++ b/issue149_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type user struct {
diff --git a/issue174_test.go b/issue174_test.go
index d06b68b..82e6571 100644
--- a/issue174_test.go
+++ b/issue174_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type structWithBlankField struct {
diff --git a/issue17_test.go b/issue17_test.go
index 97bbd7d..1d111b0 100644
--- a/issue17_test.go
+++ b/issue17_test.go
@@ -4,7 +4,7 @@ import (
 	"encoding/json"
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestIssue17MergeWithOverwrite(t *testing.T) {
diff --git a/issue202_test.go b/issue202_test.go
new file mode 100644
index 0000000..1ac8017
--- /dev/null
+++ b/issue202_test.go
@@ -0,0 +1,138 @@
+package mergo_test
+
+import (
+	"reflect"
+	"testing"
+
+	"dario.cat/mergo"
+)
+
+func TestIssue202(t *testing.T) {
+	tests := []struct {
+		name           string
+		dst, src, want map[string]interface{}
+	}{
+		{
+			name: "slice override string",
+			dst: map[string]interface{}{
+				"x": 456,
+				"y": "foo",
+			},
+			src: map[string]interface{}{
+				"x": "123",
+				"y": []int{1, 2, 3},
+			},
+			want: map[string]interface{}{
+				"x": "123",
+				"y": []int{1, 2, 3},
+			},
+		},
+		{
+			name: "string override slice",
+			dst: map[string]interface{}{
+				"x": 456,
+				"y": []int{1, 2, 3},
+			},
+			src: map[string]interface{}{
+				"x": "123",
+				"y": "foo",
+			},
+			want: map[string]interface{}{
+				"x": "123",
+				"y": "foo",
+			},
+		},
+		{
+			name: "map override string",
+			dst: map[string]interface{}{
+				"x": 456,
+				"y": "foo",
+			},
+			src: map[string]interface{}{
+				"x": "123",
+				"y": map[string]interface{}{
+					"a": true,
+				},
+			},
+			want: map[string]interface{}{
+				"x": "123",
+				"y": map[string]interface{}{
+					"a": true,
+				},
+			},
+		},
+		{
+			name: "string override map",
+			dst: map[string]interface{}{
+				"x": 456,
+				"y": map[string]interface{}{
+					"a": true,
+				},
+			},
+			src: map[string]interface{}{
+				"x": "123",
+				"y": "foo",
+			},
+			want: map[string]interface{}{
+				"x": "123",
+				"y": "foo",
+			},
+		},
+		{
+			name: "map override map",
+			dst: map[string]interface{}{
+				"x": 456,
+				"y": map[string]interface{}{
+					"a": 10,
+				},
+			},
+			src: map[string]interface{}{
+				"x": "123",
+				"y": map[string]interface{}{
+					"a": true,
+				},
+			},
+			want: map[string]interface{}{
+				"x": "123",
+				"y": map[string]interface{}{
+					"a": true,
+				},
+			},
+		},
+		{
+			name: "map override map with merge",
+			dst: map[string]interface{}{
+				"x": 456,
+				"y": map[string]interface{}{
+					"a": 10,
+					"b": 100,
+				},
+			},
+			src: map[string]interface{}{
+				"x": "123",
+				"y": map[string]interface{}{
+					"a": true,
+				},
+			},
+			want: map[string]interface{}{
+				"x": "123",
+				"y": map[string]interface{}{
+					"a": true,
+					"b": 100,
+				},
+			},
+		},
+	}
+
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			if err := mergo.Merge(&tt.dst, tt.src, mergo.WithOverride); err != nil {
+				t.Error(err)
+			}
+
+			if !reflect.DeepEqual(tt.dst, tt.want) {
+				t.Errorf("maps not equal.\nwant:\n%v\ngot:\n%v\n", tt.want, tt.dst)
+			}
+		})
+	}
+}
diff --git a/issue209_test.go b/issue209_test.go
new file mode 100644
index 0000000..0618d40
--- /dev/null
+++ b/issue209_test.go
@@ -0,0 +1,26 @@
+package mergo_test
+
+import (
+	"testing"
+
+	"dario.cat/mergo"
+)
+
+func TestIssue209(t *testing.T) {
+	dst := []string{"a", "b"}
+	src := []string{"c", "d"}
+
+	if err := mergo.Merge(&dst, src, mergo.WithAppendSlice); err != nil {
+		t.Error(err)
+	}
+
+	expected := []string{"a", "b", "c", "d"}
+	if len(dst) != len(expected) {
+		t.Errorf("arrays not equal length")
+	}
+	for i := range expected {
+		if dst[i] != expected[i] {
+			t.Errorf("array elements at %d are not equal", i)
+		}
+	}
+}
diff --git a/issue220_test.go b/issue220_test.go
new file mode 100644
index 0000000..8d4c5f8
--- /dev/null
+++ b/issue220_test.go
@@ -0,0 +1,33 @@
+package mergo_test
+
+import (
+	"reflect"
+	"testing"
+
+	"dario.cat/mergo"
+)
+
+func TestIssue220(t *testing.T) {
+	dst := []interface{}{
+		map[string]int{
+			"a": 1,
+		},
+	}
+	src := []interface{}{
+		"nil",
+	}
+	expected := []interface{}{
+		map[string]int{
+			"a": 1,
+		},
+	}
+
+	err := mergo.Merge(&dst, src, mergo.WithSliceDeepCopy)
+	if err != nil {
+		t.Errorf("unexpected error %v", err)
+	}
+
+	if !reflect.DeepEqual(dst, expected) {
+		t.Errorf("expected: %#v\ngot: %#v", expected, dst)
+	}
+}
diff --git a/issue230_test.go b/issue230_test.go
new file mode 100644
index 0000000..e4b3f29
--- /dev/null
+++ b/issue230_test.go
@@ -0,0 +1,85 @@
+package mergo_test
+
+import (
+	"testing"
+
+	"dario.cat/mergo"
+)
+
+var testDataM = []struct {
+	M1                     mapTest
+	M2                     mapTest
+	WithOverrideEmptyValue bool
+	ExpectedMap            map[int]int
+}{
+	{
+		M1: mapTest{
+			M: map[int]int{1: 1, 3: 3},
+		},
+		M2: mapTest{
+			M: map[int]int{1: 2, 2: 2},
+		},
+		WithOverrideEmptyValue: true,
+		ExpectedMap:            map[int]int{1: 1, 3: 3},
+	},
+	{
+		M1: mapTest{
+			M: map[int]int{1: 1, 3: 3},
+		},
+		M2: mapTest{
+			M: map[int]int{1: 2, 2: 2},
+		},
+		WithOverrideEmptyValue: false,
+		ExpectedMap:            map[int]int{1: 1, 2: 2, 3: 3},
+	},
+	{
+		M1: mapTest{
+			M: map[int]int{},
+		},
+		M2: mapTest{
+			M: map[int]int{1: 2, 2: 2},
+		},
+		WithOverrideEmptyValue: true,
+		ExpectedMap:            map[int]int{},
+	},
+	{
+		M1: mapTest{
+			M: map[int]int{},
+		},
+		M2: mapTest{
+			M: map[int]int{1: 2, 2: 2},
+		},
+		WithOverrideEmptyValue: false,
+		ExpectedMap:            map[int]int{1: 2, 2: 2},
+	},
+}
+
+func withOverrideEmptyValue(enable bool) func(*mergo.Config) {
+	if enable {
+		return mergo.WithOverwriteWithEmptyValue
+	}
+
+	return mergo.WithOverride
+}
+
+func TestMergeMapWithOverride(t *testing.T) {
+	t.Parallel()
+
+	for _, data := range testDataM {
+		err := mergo.Merge(&data.M2, data.M1, withOverrideEmptyValue(data.WithOverrideEmptyValue))
+		if err != nil {
+			t.Errorf("Error while merging %s", err)
+		}
+
+		if len(data.M2.M) != len(data.ExpectedMap) {
+			t.Errorf("Got %d elements in map, but expected %d", len(data.M2.M), len(data.ExpectedMap))
+			return
+		}
+
+		for i, val := range data.M2.M {
+			if val != data.ExpectedMap[i] {
+				t.Errorf("Expected value: %d, but got %d while merging map", data.ExpectedMap[i], val)
+			}
+		}
+	}
+}
diff --git a/issue23_test.go b/issue23_test.go
index d91bd79..9076466 100644
--- a/issue23_test.go
+++ b/issue23_test.go
@@ -4,7 +4,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type document struct {
diff --git a/issue33_test.go b/issue33_test.go
index cf92735..6474cb7 100644
--- a/issue33_test.go
+++ b/issue33_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type Foo struct {
diff --git a/issue38_test.go b/issue38_test.go
index fdee7ff..32b3c91 100644
--- a/issue38_test.go
+++ b/issue38_test.go
@@ -4,7 +4,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type structWithoutTimePointer struct {
diff --git a/issue50_test.go b/issue50_test.go
index 2d32579..b23b0dd 100644
--- a/issue50_test.go
+++ b/issue50_test.go
@@ -4,7 +4,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type testStruct struct {
diff --git a/issue52_test.go b/issue52_test.go
index af65471..211ab7d 100644
--- a/issue52_test.go
+++ b/issue52_test.go
@@ -5,7 +5,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type structWithTime struct {
diff --git a/issue61_test.go b/issue61_test.go
index c94d693..cff180c 100644
--- a/issue61_test.go
+++ b/issue61_test.go
@@ -4,7 +4,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestIssue61MergeNilMap(t *testing.T) {
diff --git a/issue64_test.go b/issue64_test.go
index c3d2772..ff5153f 100644
--- a/issue64_test.go
+++ b/issue64_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type Student struct {
diff --git a/issue66_test.go b/issue66_test.go
index 643d4bb..f33c5a8 100644
--- a/issue66_test.go
+++ b/issue66_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type PrivateSliceTest66 struct {
diff --git a/issue83_test.go b/issue83_test.go
index d10e892..13ccdbd 100644
--- a/issue83_test.go
+++ b/issue83_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type issue83My struct {
diff --git a/issue84_test.go b/issue84_test.go
index b01ebf4..d4aedef 100644
--- a/issue84_test.go
+++ b/issue84_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type DstStructIssue84 struct {
diff --git a/issue89_test.go b/issue89_test.go
index 0a38994..4c89f34 100644
--- a/issue89_test.go
+++ b/issue89_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestIssue89Boolean(t *testing.T) {
@@ -33,20 +33,16 @@ func TestIssue89MergeWithEmptyValue(t *testing.T) {
 		t.Error(err)
 	}
 	testCases := []struct {
-		key      string
 		expected interface{}
+		key      string
 	}{
 		{
-			"A",
-			3,
-		},
-		{
-			"B",
 			"",
+			"B",
 		},
 		{
-			"C",
 			false,
+			"C",
 		},
 	}
 	for _, tC := range testCases {
diff --git a/issue90_test.go b/issue90_test.go
index 872a327..bdd9d31 100644
--- a/issue90_test.go
+++ b/issue90_test.go
@@ -1,20 +1,20 @@
 package mergo_test
 
 import (
-	"github.com/imdario/mergo"
 	"reflect"
 	"testing"
+
+	"dario.cat/mergo"
 )
 
 type structWithStringMap struct {
 	Data map[string]string
 }
 
-
 func TestIssue90(t *testing.T) {
-    dst := map[string]structWithStringMap{
-    	"struct": {
-    		Data: nil,
+	dst := map[string]structWithStringMap{
+		"struct": {
+			Data: nil,
 		},
 	}
 	src := map[string]structWithStringMap{
diff --git a/issueXXX_test.go b/issueXXX_test.go
index e5f424f..77c18a1 100644
--- a/issueXXX_test.go
+++ b/issueXXX_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 var testDataS = []struct {
diff --git a/map.go b/map.go
index a13a7ee..b50d5c2 100644
--- a/map.go
+++ b/map.go
@@ -44,7 +44,7 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, conf
 			}
 		}
 		// Remember, remember...
-		visited[h] = &visit{addr, typ, seen}
+		visited[h] = &visit{typ, seen, addr}
 	}
 	zeroValue := reflect.Value{}
 	switch dst.Kind() {
@@ -58,7 +58,7 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, conf
 			}
 			fieldName := field.Name
 			fieldName = changeInitialCase(fieldName, unicode.ToLower)
-			if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v)) || overwrite) {
+			if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v), !config.ShouldNotDereference) || overwrite) {
 				dstMap[fieldName] = src.Field(i).Interface()
 			}
 		}
@@ -142,7 +142,7 @@ func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error {
 
 func _map(dst, src interface{}, opts ...func(*Config)) error {
 	if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr {
-		return ErrNonPointerAgument
+		return ErrNonPointerArgument
 	}
 	var (
 		vDst, vSrc reflect.Value
diff --git a/merge.go b/merge.go
index 8c2a8fc..0ef9b21 100644
--- a/merge.go
+++ b/merge.go
@@ -38,10 +38,11 @@ func isExportedComponent(field *reflect.StructField) bool {
 }
 
 type Config struct {
+	Transformers                 Transformers
 	Overwrite                    bool
+	ShouldNotDereference         bool
 	AppendSlice                  bool
 	TypeCheck                    bool
-	Transformers                 Transformers
 	overwriteWithEmptyValue      bool
 	overwriteSliceWithEmptyValue bool
 	sliceDeepCopy                bool
@@ -76,10 +77,10 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 			}
 		}
 		// Remember, remember...
-		visited[h] = &visit{addr, typ, seen}
+		visited[h] = &visit{typ, seen, addr}
 	}
 
-	if config.Transformers != nil && !isEmptyValue(dst) {
+	if config.Transformers != nil && !isReflectNil(dst) && dst.IsValid() {
 		if fn := config.Transformers.Transformer(dst.Type()); fn != nil {
 			err = fn(dst, src)
 			return
@@ -95,7 +96,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 				}
 			}
 		} else {
-			if dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src) || overwriteWithEmptySrc) {
+			if dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) {
 				dst.Set(src)
 			}
 		}
@@ -110,7 +111,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 		}
 
 		if src.Kind() != reflect.Map {
-			if overwrite {
+			if overwrite && dst.CanSet() {
 				dst.Set(src)
 			}
 			return
@@ -162,7 +163,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 						dstSlice = reflect.ValueOf(dstElement.Interface())
 					}
 
-					if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice && !sliceDeepCopy {
+					if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy {
 						if typeCheck && srcSlice.Type() != dstSlice.Type() {
 							return fmt.Errorf("cannot override two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type())
 						}
@@ -194,22 +195,38 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 					dst.SetMapIndex(key, dstSlice)
 				}
 			}
-			if dstElement.IsValid() && !isEmptyValue(dstElement) && (reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map || reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice) {
-				continue
+
+			if dstElement.IsValid() && !isEmptyValue(dstElement, !config.ShouldNotDereference) {
+				if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice {
+					continue
+				}
+				if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map && reflect.TypeOf(dstElement.Interface()).Kind() == reflect.Map {
+					continue
+				}
 			}
 
-			if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement)) {
+			if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement, !config.ShouldNotDereference)) {
 				if dst.IsNil() {
 					dst.Set(reflect.MakeMap(dst.Type()))
 				}
 				dst.SetMapIndex(key, srcElement)
 			}
 		}
+
+		// Ensure that all keys in dst are deleted if they are not in src.
+		if overwriteWithEmptySrc {
+			for _, key := range dst.MapKeys() {
+				srcElement := src.MapIndex(key)
+				if !srcElement.IsValid() {
+					dst.SetMapIndex(key, reflect.Value{})
+				}
+			}
+		}
 	case reflect.Slice:
 		if !dst.CanSet() {
 			break
 		}
-		if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice && !sliceDeepCopy {
+		if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy {
 			dst.Set(src)
 		} else if config.AppendSlice {
 			if src.Type() != dst.Type() {
@@ -244,12 +261,18 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 
 		if src.Kind() != reflect.Interface {
 			if dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) {
-				if dst.CanSet() && (overwrite || isEmptyValue(dst)) {
+				if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) {
 					dst.Set(src)
 				}
 			} else if src.Kind() == reflect.Ptr {
-				if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {
-					return
+				if !config.ShouldNotDereference {
+					if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {
+						return
+					}
+				} else {
+					if overwriteWithEmptySrc || (overwrite && !src.IsNil()) || dst.IsNil() {
+						dst.Set(src)
+					}
 				}
 			} else if dst.Elem().Type() == src.Type() {
 				if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil {
@@ -262,7 +285,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 		}
 
 		if dst.IsNil() || overwrite {
-			if dst.CanSet() && (overwrite || isEmptyValue(dst)) {
+			if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) {
 				dst.Set(src)
 			}
 			break
@@ -275,7 +298,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
 			break
 		}
 	default:
-		mustSet := (isEmptyValue(dst) || overwrite) && (!isEmptyValue(src) || overwriteWithEmptySrc)
+		mustSet := (isEmptyValue(dst, !config.ShouldNotDereference) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc)
 		if mustSet {
 			if dst.CanSet() {
 				dst.Set(src)
@@ -326,6 +349,12 @@ func WithOverrideEmptySlice(config *Config) {
 	config.overwriteSliceWithEmptyValue = true
 }
 
+// WithoutDereference prevents dereferencing pointers when evaluating whether they are empty
+// (i.e. a non-nil pointer is never considered empty).
+func WithoutDereference(config *Config) {
+	config.ShouldNotDereference = true
+}
+
 // WithAppendSlice will make merge append slices instead of overwriting it.
 func WithAppendSlice(config *Config) {
 	config.AppendSlice = true
@@ -344,7 +373,7 @@ func WithSliceDeepCopy(config *Config) {
 
 func merge(dst, src interface{}, opts ...func(*Config)) error {
 	if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr {
-		return ErrNonPointerAgument
+		return ErrNonPointerArgument
 	}
 	var (
 		vDst, vSrc reflect.Value
diff --git a/merge_test.go b/merge_test.go
index dd51dab..6e5fd86 100644
--- a/merge_test.go
+++ b/merge_test.go
@@ -4,7 +4,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type transformer struct {
@@ -19,13 +19,13 @@ func (s *transformer) Transformer(t reflect.Type) func(dst, src reflect.Value) e
 }
 
 type foo struct {
-	s   string
 	Bar *bar
+	s   string
 }
 
 type bar struct {
-	i int
 	s map[string]string
+	i int
 }
 
 func TestMergeWithTransformerNilStruct(t *testing.T) {
@@ -64,7 +64,7 @@ func TestMergeNonPointer(t *testing.T) {
 			"a": "1",
 		},
 	}
-	want := mergo.ErrNonPointerAgument
+	want := mergo.ErrNonPointerArgument
 
 	if got := mergo.Merge(dst, src); got != want {
 		t.Errorf("want: %s, got: %s", want, got)
@@ -81,7 +81,7 @@ func TestMapNonPointer(t *testing.T) {
 			},
 		},
 	}
-	want := mergo.ErrNonPointerAgument
+	want := mergo.ErrNonPointerArgument
 	if got := mergo.Merge(dst, src); got != want {
 		t.Errorf("want: %s, got: %s", want, got)
 	}
diff --git a/mergo.go b/mergo.go
index 3cc926c..0a721e2 100644
--- a/mergo.go
+++ b/mergo.go
@@ -17,10 +17,10 @@ import (
 var (
 	ErrNilArguments                = errors.New("src and dst must not be nil")
 	ErrDifferentArgumentsTypes     = errors.New("src and dst must be of same type")
-	ErrNotSupported                = errors.New("only structs and maps are supported")
+	ErrNotSupported                = errors.New("only structs, maps, and slices are supported")
 	ErrExpectedMapAsDestination    = errors.New("dst was expected to be a map")
 	ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct")
-	ErrNonPointerAgument           = errors.New("dst must be a pointer")
+	ErrNonPointerArgument          = errors.New("dst must be a pointer")
 )
 
 // During deepMerge, must keep track of checks that are
@@ -28,13 +28,13 @@ var (
 // checks in progress are true when it reencounters them.
 // Visited are stored in a map indexed by 17 * a1 + a2;
 type visit struct {
-	ptr  uintptr
 	typ  reflect.Type
 	next *visit
+	ptr  uintptr
 }
 
 // From src/pkg/encoding/json/encode.go.
-func isEmptyValue(v reflect.Value) bool {
+func isEmptyValue(v reflect.Value, shouldDereference bool) bool {
 	switch v.Kind() {
 	case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
 		return v.Len() == 0
@@ -50,7 +50,10 @@ func isEmptyValue(v reflect.Value) bool {
 		if v.IsNil() {
 			return true
 		}
-		return isEmptyValue(v.Elem())
+		if shouldDereference {
+			return isEmptyValue(v.Elem(), shouldDereference)
+		}
+		return false
 	case reflect.Func:
 		return v.IsNil()
 	case reflect.Invalid:
@@ -65,7 +68,7 @@ func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) {
 		return
 	}
 	vDst = reflect.ValueOf(dst).Elem()
-	if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map {
+	if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map && vDst.Kind() != reflect.Slice {
 		err = ErrNotSupported
 		return
 	}
diff --git a/mergo_test.go b/mergo_test.go
index d69714c..68c8aa5 100644
--- a/mergo_test.go
+++ b/mergo_test.go
@@ -12,8 +12,8 @@ import (
 	"testing"
 	"time"
 
-	"github.com/imdario/mergo"
-	"gopkg.in/yaml.v2"
+	"dario.cat/mergo"
+	"gopkg.in/yaml.v3"
 )
 
 type simpleTest struct {
@@ -21,9 +21,9 @@ type simpleTest struct {
 }
 
 type complexTest struct {
+	ID string
 	St simpleTest
 	sz int
-	ID string
 }
 
 type mapTest struct {
@@ -50,8 +50,8 @@ type sliceTest struct {
 
 func TestKb(t *testing.T) {
 	type testStruct struct {
-		Name     string
 		KeyValue map[string]interface{}
+		Name     string
 	}
 
 	akv := make(map[string]interface{})
@@ -116,7 +116,7 @@ func TestSimpleStruct(t *testing.T) {
 func TestComplexStruct(t *testing.T) {
 	a := complexTest{}
 	a.ID = "athing"
-	b := complexTest{simpleTest{42}, 1, "bthing"}
+	b := complexTest{"bthing", simpleTest{42}, 1}
 	if err := mergo.Merge(&a, b); err != nil {
 		t.FailNow()
 	}
@@ -132,10 +132,10 @@ func TestComplexStruct(t *testing.T) {
 }
 
 func TestComplexStructWithOverwrite(t *testing.T) {
-	a := complexTest{simpleTest{1}, 1, "do-not-overwrite-with-empty-value"}
-	b := complexTest{simpleTest{42}, 2, ""}
+	a := complexTest{"do-not-overwrite-with-empty-value", simpleTest{1}, 1}
+	b := complexTest{"", simpleTest{42}, 2}
 
-	expect := complexTest{simpleTest{42}, 1, "do-not-overwrite-with-empty-value"}
+	expect := complexTest{"do-not-overwrite-with-empty-value", simpleTest{42}, 1}
 	if err := mergo.MergeWithOverwrite(&a, b); err != nil {
 		t.FailNow()
 	}
@@ -417,22 +417,22 @@ func TestMergeUsingStructAndMap(t *testing.T) {
 		Msg2 string
 	}
 	type params struct {
-		Name  string
 		Multi *multiPtr
 		Final *final
+		Name  string
 	}
 	type config struct {
+		Params *params
 		Foo    string
 		Bar    string
-		Params *params
 	}
 
 	cases := []struct {
-		name      string
-		overwrite bool
 		changes   *config
 		target    *config
 		output    *config
+		name      string
+		overwrite bool
 	}{
 		{
 			name:      "Should overwrite values in target for non-nil values in source",
@@ -603,18 +603,18 @@ func TestMapsWithNilPointer(t *testing.T) {
 func TestYAMLMaps(t *testing.T) {
 	thing := loadYAML("testdata/thing.yml")
 	license := loadYAML("testdata/license.yml")
-	ft := thing["fields"].(map[interface{}]interface{})
-	fl := license["fields"].(map[interface{}]interface{})
+	ft := thing["fields"].(map[string]interface{})
+	fl := license["fields"].(map[string]interface{})
 	// license has one extra field (site) and another already existing in thing (author) that Mergo won't override.
 	expectedLength := len(ft) + len(fl) - 1
 	if err := mergo.Merge(&license, thing); err != nil {
 		t.Error(err.Error())
 	}
-	currentLength := len(license["fields"].(map[interface{}]interface{}))
+	currentLength := len(license["fields"].(map[string]interface{}))
 	if currentLength != expectedLength {
 		t.Errorf(`thing not merged in license properly, license must have %d elements instead of %d`, expectedLength, currentLength)
 	}
-	fields := license["fields"].(map[interface{}]interface{})
+	fields := license["fields"].(map[string]interface{})
 	if _, ok := fields["id"]; !ok {
 		t.Errorf(`thing not merged in license properly, license must have a new id field from thing`)
 	}
@@ -721,13 +721,13 @@ func TestIfcMapWithOverwrite(t *testing.T) {
 }
 
 type pointerMapTest struct {
+	B      *simpleTest
 	A      int
 	hidden int
-	B      *simpleTest
 }
 
 func TestBackAndForth(t *testing.T) {
-	pt := pointerMapTest{42, 1, &simpleTest{66}}
+	pt := pointerMapTest{&simpleTest{66}, 42, 1}
 	m := make(map[string]interface{})
 	if err := mergo.Map(&m, pt); err != nil {
 		t.FailNow()
@@ -763,8 +763,8 @@ func TestBackAndForth(t *testing.T) {
 
 func TestEmbeddedPointerUnpacking(t *testing.T) {
 	tests := []struct{ input pointerMapTest }{
-		{pointerMapTest{42, 1, nil}},
-		{pointerMapTest{42, 1, &simpleTest{66}}},
+		{pointerMapTest{nil, 42, 1}},
+		{pointerMapTest{&simpleTest{66}, 42, 1}},
 	}
 	newValue := 77
 	m := map[string]interface{}{
@@ -900,18 +900,18 @@ func TestBooleanPointer(t *testing.T) {
 func TestMergeMapWithInnerSliceOfDifferentType(t *testing.T) {
 	testCases := []struct {
 		name    string
-		options []func(*mergo.Config)
 		err     string
+		options []func(*mergo.Config)
 	}{
 		{
 			"With override and append slice",
-			[]func(*mergo.Config){mergo.WithOverride, mergo.WithAppendSlice},
 			"cannot append two slices with different type",
+			[]func(*mergo.Config){mergo.WithOverride, mergo.WithAppendSlice},
 		},
 		{
 			"With override and type check",
-			[]func(*mergo.Config){mergo.WithOverride, mergo.WithTypeCheck},
 			"cannot override two slices with different type",
+			[]func(*mergo.Config){mergo.WithOverride, mergo.WithTypeCheck},
 		},
 	}
 	for _, tc := range testCases {
@@ -930,11 +930,11 @@ func TestMergeMapWithInnerSliceOfDifferentType(t *testing.T) {
 	}
 }
 
-func TestMergeSlicesIsNotSupported(t *testing.T) {
+func TestMergeDifferentSlicesIsNotSupported(t *testing.T) {
 	src := []string{"a", "b"}
 	dst := []int{1, 2}
 
-	if err := mergo.Merge(&src, &dst, mergo.WithOverride, mergo.WithAppendSlice); err != mergo.ErrNotSupported {
+	if err := mergo.Merge(&src, &dst, mergo.WithOverride, mergo.WithAppendSlice); err != mergo.ErrDifferentArgumentsTypes {
 		t.Errorf("expected %q, got %q", mergo.ErrNotSupported, err)
 	}
 }
diff --git a/pr211_2_test.go b/pr211_2_test.go
new file mode 100644
index 0000000..df4c575
--- /dev/null
+++ b/pr211_2_test.go
@@ -0,0 +1,25 @@
+package mergo
+
+import (
+	"reflect"
+	"testing"
+	"time"
+)
+
+type transformer struct {
+}
+
+func (s *transformer) Transformer(t reflect.Type) func(dst, src reflect.Value) error {
+	return nil
+}
+
+func Test_deepMergeTransformerInvalidDestination(t *testing.T) {
+	foo := time.Time{}
+	src := reflect.ValueOf(foo)
+	deepMerge(reflect.Value{}, src, make(map[uintptr]*visit), 0, &Config{
+		Transformers: &transformer{},
+	})
+	// this test is intentionally not asserting on anything, it's sole
+	// purpose to verify deepMerge doesn't panic when a transformer is
+	// passed and the destination is invalid.
+}
diff --git a/pr211_test.go b/pr211_test.go
new file mode 100644
index 0000000..00830ce
--- /dev/null
+++ b/pr211_test.go
@@ -0,0 +1,36 @@
+package mergo_test
+
+import (
+	"reflect"
+	"testing"
+
+	"dario.cat/mergo"
+)
+
+func TestMergeWithTransformerZeroValue(t *testing.T) {
+	// This test specifically tests that a transformer can be used to
+	// prevent overwriting a zero value (in this case a bool). This would fail prior to #211
+	type fooWithBoolPtr struct {
+		b *bool
+	}
+	var Bool = func(b bool) *bool { return &b }
+	a := fooWithBoolPtr{b: Bool(false)}
+	b := fooWithBoolPtr{b: Bool(true)}
+
+	if err := mergo.Merge(&a, &b, mergo.WithTransformers(&transformer{
+		m: map[reflect.Type]func(dst, src reflect.Value) error{
+			reflect.TypeOf(Bool(false)): func(dst, src reflect.Value) error {
+				if dst.CanSet() && dst.IsNil() {
+					dst.Set(src)
+				}
+				return nil
+			},
+		},
+	})); err != nil {
+		t.Error(err)
+	}
+
+	if *a.b != false {
+		t.Errorf("b not merged in properly: a.b(%v) != expected(%v)", a.b, false)
+	}
+}
diff --git a/pr80_test.go b/pr80_test.go
index 64f2a78..8dfae60 100644
--- a/pr80_test.go
+++ b/pr80_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type mapInterface map[string]interface{}
diff --git a/pr81_test.go b/pr81_test.go
index 30abe74..903dd0d 100644
--- a/pr81_test.go
+++ b/pr81_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 func TestMapInterfaceWithMultipleLayer(t *testing.T) {
diff --git a/v039_bugs_test.go b/v039_bugs_test.go
index c470ed0..04db29d 100644
--- a/v039_bugs_test.go
+++ b/v039_bugs_test.go
@@ -3,7 +3,7 @@ package mergo_test
 import (
 	"testing"
 
-	"github.com/imdario/mergo"
+	"dario.cat/mergo"
 )
 
 type inner struct {
@@ -53,8 +53,8 @@ func TestV039Issue152(t *testing.T) {
 }
 
 type issue146Foo struct {
-	A string
 	B map[string]issue146Bar
+	A string
 }
 
 type issue146Bar struct {

More details

Full run details

Historical runs