mirror of
https://github.com/langhuihui/monibuca.git
synced 2026-05-08 15:01:05 +08:00
fix: Parse will modify map
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/mcuadros/go-defaults"
|
||||
"log/slog"
|
||||
"maps"
|
||||
"os"
|
||||
"reflect"
|
||||
"regexp"
|
||||
@@ -382,5 +383,5 @@ func (config *Config) assign(k string, v any) (target reflect.Value) {
|
||||
func Parse(target any, conf map[string]any) {
|
||||
var c Config
|
||||
c.Parse(target)
|
||||
c.ParseModifyFile(conf)
|
||||
c.ParseModifyFile(maps.Clone(conf))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user