Add whitespace linter (#24855)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
176370e175
Коммит
0d5a8b8841
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user