diff --git a/go.mod b/go.mod index f606eb7..83c8559 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/0xfelix/hetzner-dnsapi-proxy go 1.23 require ( - github.com/caarlos0/env/v11 v11.3.0 + github.com/caarlos0/env/v11 v11.3.1 github.com/gin-gonic/gin v1.10.0 ) diff --git a/go.sum b/go.sum index 5bb7374..f587f75 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/bytedance/sonic v1.12.4/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKz github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iCjjJv3+E= github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/caarlos0/env/v11 v11.3.0 h1:CVTN6W6+twFC1jHKUwsw9eOTEiFpzyJOSA2AyHa8uvw= -github.com/caarlos0/env/v11 v11.3.0/go.mod h1:Q5lYHeOsgY20CCV/R+b50Jwg2MnjySid7+3FUBz2BJw= +github.com/caarlos0/env/v11 v11.3.1 h1:cArPWC15hWmEt+gWk7YBi7lEXTXCvpaSdCiZE2X5mCA= +github.com/caarlos0/env/v11 v11.3.1/go.mod h1:qupehSf/Y0TUTsxKywqRt/vJjN5nz6vauiYEUUr8P4U= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= diff --git a/vendor/github.com/caarlos0/env/v11/.gitignore b/vendor/github.com/caarlos0/env/v11/.gitignore index ca6a0ff..9eea1c9 100644 --- a/vendor/github.com/caarlos0/env/v11/.gitignore +++ b/vendor/github.com/caarlos0/env/v11/.gitignore @@ -2,3 +2,4 @@ coverage.txt bin card.png dist +codecov* diff --git a/vendor/github.com/caarlos0/env/v11/env.go b/vendor/github.com/caarlos0/env/v11/env.go index f658e3b..805ee2d 100644 --- a/vendor/github.com/caarlos0/env/v11/env.go +++ b/vendor/github.com/caarlos0/env/v11/env.go @@ -195,19 +195,20 @@ func mergeOptions[T any](target, source *T) { targetType := targetPtr.Type() for i := 0; i < targetPtr.NumField(); i++ { + fieldName := targetType.Field(i).Name targetField := targetPtr.Field(i) - sourceField := sourcePtr.FieldByName(targetType.Field(i).Name) + sourceField := sourcePtr.FieldByName(fieldName) if targetField.CanSet() && !isZero(sourceField) { - switch targetField.Kind() { - case reflect.Map: + // FuncMaps are being merged, while Environments must be overwritten + if fieldName == "FuncMap" { if !sourceField.IsZero() { iter := sourceField.MapRange() for iter.Next() { targetField.SetMapIndex(iter.Key(), iter.Value()) } } - default: + } else { targetField.Set(sourceField) } } diff --git a/vendor/modules.txt b/vendor/modules.txt index db6b93a..661db9d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -36,7 +36,7 @@ github.com/bytedance/sonic/utf8 github.com/bytedance/sonic/loader github.com/bytedance/sonic/loader/internal/abi github.com/bytedance/sonic/loader/internal/rt -# github.com/caarlos0/env/v11 v11.3.0 +# github.com/caarlos0/env/v11 v11.3.1 ## explicit; go 1.18 github.com/caarlos0/env/v11 # github.com/cloudwego/base64x v0.1.4