Skip to content

Commit e705ebf

Browse files
authored
all: remove blank assignments for ignored calls (#356)
1 parent 90cbc29 commit e705ebf

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

cmd/boot/internal/rescue/rescue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (m *impl) update(thread *starlark.Thread, b *starlark.Builtin, args starlar
8989
return "", err
9090
}
9191
if err := run(ctx, m.rt.NeedsSudo(), "", "sbctl", "sign", "-s", target); err != nil {
92-
_ = run(ctx, m.rt.NeedsSudo(), "", "rm", "-f", target)
92+
run(ctx, m.rt.NeedsSudo(), "", "rm", "-f", target)
9393
return "", err
9494
}
9595
if err := prune(ctx, m.rt, esp, keep); err != nil {
@@ -164,7 +164,7 @@ func prune(ctx context.Context, rt *boot.Runtime, esp string, keep int) error {
164164
if err := run(ctx, rt.NeedsSudo(), "", "rm", "-f", image.path); err != nil {
165165
return err
166166
}
167-
_ = run(ctx, rt.NeedsSudo(), "", "sbctl", "remove-file", image.path)
167+
run(ctx, rt.NeedsSudo(), "", "sbctl", "remove-file", image.path)
168168
}
169169
return nil
170170
}

cmd/tgfeed/internal/admin/admin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (a *api) handleGetConfig(w http.ResponseWriter, r *http.Request) {
242242
return
243243
}
244244
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
245-
_, _ = w.Write([]byte(config))
245+
w.Write([]byte(config))
246246
}
247247

248248
func (a *api) handlePutConfig(w http.ResponseWriter, r *http.Request) {
@@ -280,7 +280,7 @@ func (a *api) handleGetState(w http.ResponseWriter, r *http.Request) {
280280
return
281281
}
282282
w.Header().Set("Content-Type", "application/json; charset=utf-8")
283-
_, _ = w.Write(content)
283+
w.Write(content)
284284
}
285285

286286
func (a *api) handlePutState(w http.ResponseWriter, r *http.Request) {
@@ -313,7 +313,7 @@ func (a *api) handleGetErrorTemplate(w http.ResponseWriter, r *http.Request) {
313313
return
314314
}
315315
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
316-
_, _ = w.Write([]byte(errorTemplate))
316+
w.Write([]byte(errorTemplate))
317317
}
318318

319319
func (a *api) handlePutErrorTemplate(w http.ResponseWriter, r *http.Request) {

cmd/tgfeed/internal/state/state_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestStoreRemoteErrorPropagation(t *testing.T) {
5353
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
5454
if r.URL.Path == "/api/config" {
5555
w.WriteHeader(http.StatusBadRequest)
56-
_, _ = w.Write([]byte(`{"error":"bad config"}`))
56+
w.Write([]byte(`{"error":"bad config"}`))
5757
return
5858
}
5959
w.WriteHeader(http.StatusNotFound)

internal/filelock/filelock.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ func Acquire(path string, payload string) (Lock, error) {
3636
}
3737
if payload != "" {
3838
if err := lockFile.Truncate(0); err != nil {
39-
_ = (&fileLock{file: lockFile}).Release()
39+
(&fileLock{file: lockFile}).Release()
4040
return nil, err
4141
}
4242
if _, err := lockFile.Seek(0, 0); err != nil {
43-
_ = (&fileLock{file: lockFile}).Release()
43+
(&fileLock{file: lockFile}).Release()
4444
return nil, err
4545
}
4646
if _, err := lockFile.WriteString(payload); err != nil {
47-
_ = (&fileLock{file: lockFile}).Release()
47+
(&fileLock{file: lockFile}).Release()
4848
return nil, err
4949
}
5050
}
@@ -61,7 +61,7 @@ func IsLocked(path string) bool {
6161

6262
err = syscall.Flock(int(lockFile.Fd()), syscall.LOCK_EX|syscall.LOCK_NB)
6363
if err == nil {
64-
_ = syscall.Flock(int(lockFile.Fd()), syscall.LOCK_UN)
64+
syscall.Flock(int(lockFile.Fd()), syscall.LOCK_UN)
6565
return false
6666
}
6767

0 commit comments

Comments
 (0)