all: simplify s[:] to s where s is a slice (#17673)
This commit is contained in:
@ -501,7 +501,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
|
||||
var respbody []byte
|
||||
|
||||
url := srv.URL + "/bzz-raw:/"
|
||||
if k[:] != "" {
|
||||
if k != "" {
|
||||
url += rootRef + "/" + k[1:] + "?content_type=text/plain"
|
||||
}
|
||||
resp, err = http.Get(url)
|
||||
@ -515,7 +515,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
|
||||
isexpectedfailrequest := false
|
||||
|
||||
for _, r := range expectedfailrequests {
|
||||
if k[:] == r {
|
||||
if k == r {
|
||||
isexpectedfailrequest = true
|
||||
}
|
||||
}
|
||||
@ -530,7 +530,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
|
||||
var respbody []byte
|
||||
|
||||
url := srv.URL + "/bzz-hash:/"
|
||||
if k[:] != "" {
|
||||
if k != "" {
|
||||
url += rootRef + "/" + k[1:]
|
||||
}
|
||||
resp, err = http.Get(url)
|
||||
@ -547,7 +547,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
|
||||
isexpectedfailrequest := false
|
||||
|
||||
for _, r := range expectedfailrequests {
|
||||
if k[:] == r {
|
||||
if k == r {
|
||||
isexpectedfailrequest = true
|
||||
}
|
||||
}
|
||||
@ -599,7 +599,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
|
||||
} {
|
||||
k := c.path
|
||||
url := srv.URL + "/bzz-list:/"
|
||||
if k[:] != "" {
|
||||
if k != "" {
|
||||
url += rootRef + "/" + k[1:]
|
||||
}
|
||||
t.Run("json list "+c.path, func(t *testing.T) {
|
||||
@ -618,7 +618,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
|
||||
isexpectedfailrequest := false
|
||||
|
||||
for _, r := range expectedfailrequests {
|
||||
if k[:] == r {
|
||||
if k == r {
|
||||
isexpectedfailrequest = true
|
||||
}
|
||||
}
|
||||
@ -650,7 +650,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
|
||||
isexpectedfailrequest := false
|
||||
|
||||
for _, r := range expectedfailrequests {
|
||||
if k[:] == r {
|
||||
if k == r {
|
||||
isexpectedfailrequest = true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user