Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Configuration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Go
Application
Configuration
Compare revisions
v1.12.0 to v1.13.0
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
oss/libraries/go/application/configuration
Select target project
No results found
v1.13.0
Select Git revision
Swap
Target
oss/libraries/go/application/configuration
Select target project
oss/libraries/go/application/configuration
1 result
v1.12.0
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
fix allow override
· 1b4021d0
Volker Schukai
authored
2 years ago
1b4021d0
Bump version to 1.13.0
· e5219bd3
Volker Schukai
authored
2 years ago
e5219bd3
Update changelog
· 01a4863d
Volker Schukai
authored
2 years ago
01a4863d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+7
-0
7 additions, 0 deletions
CHANGELOG.md
merge.go
+1
-1
1 addition, 1 deletion
merge.go
merge_test.go
+25
-0
25 additions, 0 deletions
merge_test.go
release.json
+1
-1
1 addition, 1 deletion
release.json
with
34 additions
and
2 deletions
CHANGELOG.md
View file @
01a4863d
<a
name=
"v1.13.0"
></a>
## [v1.13.0] - 2022-10-24
### Bug Fixes
-
fix allow override
<a
name=
"v1.12.0"
></a>
## [v1.12.0] - 2022-10-23
### Add Features
...
...
@@ -146,6 +152,7 @@
<a
name=
"v1.0.0"
></a>
## v1.0.0 - 2022-09-18
[
v1.13.0
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.12.0...v1.13.0
[
v1.12.0
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.4...v1.12.0
[
v1.11.4
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.3...v1.11.4
[
v1.11.3
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.2...v1.11.3
...
...
This diff is collapsed.
Click to expand it.
merge.go
View file @
01a4863d
...
...
@@ -14,7 +14,7 @@ func (s *Settings[C]) Merge(change C) *Settings[C] {
s
.
Lock
()
defer
s
.
Unlock
()
if
err
:=
mergo
.
Merge
(
&
s
.
config
,
change
);
err
!=
nil
{
if
err
:=
mergo
.
Merge
(
&
s
.
config
,
change
,
mergo
.
WithOverride
,
mergo
.
WithTypeCheck
);
err
!=
nil
{
s
.
errors
=
append
(
s
.
errors
,
err
)
}
...
...
This diff is collapsed.
Click to expand it.
merge_test.go
0 → 100644
View file @
01a4863d
// Copyright 2022 schukai GmbH
// SPDX-License-Identifier: AGPL-3.0
package
configuration
import
(
"github.com/stretchr/testify/assert"
"testing"
)
func
TestMerge
(
t
*
testing
.
T
)
{
var
configS
,
configD
ConfigStruct2
source
:=
New
(
configS
)
source
.
config
.
H
.
HA
=
2
dest
:=
New
(
configD
)
dest
.
config
.
H
.
HA
=
1
assert
.
Equal
(
t
,
dest
.
config
.
H
.
HA
,
1
)
dest
.
Merge
(
source
.
config
)
assert
.
Equal
(
t
,
dest
.
config
.
H
.
HA
,
2
)
}
This diff is collapsed.
Click to expand it.
release.json
View file @
01a4863d
{
"version"
:
"1.1
2
.0"
}
{
"version"
:
"1.1
3
.0"
}
This diff is collapsed.
Click to expand it.