Этот коммит содержится в:
Ben Schumacher
2023-10-11 10:13:36 +02:00
коммит произвёл GitHub
родитель 176370e175
Коммит 0d5a8b8841
189 изменённых файлов: 1 добавлений и 361 удалений

Просмотреть файл

@@ -119,7 +119,6 @@ func merge(base, patch reflect.Value, mergeConfig *MergeConfig) (reflect.Value,
// use base
merged := reflect.MakeSlice(commonType, 0, base.Len())
for i := 0; i < base.Len(); i++ {
// recursively merge base with itself. This will clone reference values.
val, _ := merge(base.Index(i), base.Index(i), mergeConfig)
merged = reflect.Append(merged, val)

Просмотреть файл

@@ -258,7 +258,6 @@ func TestMergeWithMaps(t *testing.T) {
// test replacing a referenced map
m1["base"] = map[string]*int{"third": newInt(777)}
assert.Equal(t, 10, *merged["base"]["level"])
})
t.Run("merge map[string]map[string]*int, pointers are not copied - change in patch do not affect merged", func(t *testing.T) {
@@ -661,7 +660,6 @@ func TestMergeWithEvenSimpler(t *testing.T) {
*t1.ES2.S = "new base"
assert.Equal(t, "base", *merged.ES2.S)
})
}
type sliceStruct struct {

Просмотреть файл

@@ -104,7 +104,6 @@ func UpdateAssetsSubpathInDir(subpath, directory string) error {
// will have affected the script, so look for the new subpath, not the old one.
oldScript := getSubpathScript(subpath)
newRootHTML = strings.Replace(newRootHTML, fmt.Sprintf("</style><script>%s</script>", oldScript), "</style>", 1)
} else if !alreadyRewritten && subpath != "/" {
// Otherwise, inject the script to define `window.publicPath`.
script := getSubpathScript(subpath)

Просмотреть файл

@@ -10,7 +10,6 @@ import (
)
func TestURLEncode(t *testing.T) {
toEncode := "testing 1 2 3"
encoded := URLEncode(toEncode)

Просмотреть файл

@@ -102,7 +102,6 @@ func GetIPAddress(r *http.Request, trustedProxyIPHeader []string) string {
if address != "" && net.ParseIP(address) != nil {
return address
}
}
host, _, _ := net.SplitHostPort(r.RemoteAddr)