Skip to content

Commit b2d95c3

Browse files
committed
lint: Resolve ignored output and pipe close errors
Signed-off-by: Paweł Gronowski <git@grono.dev>
1 parent eca6e58 commit b2d95c3

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎cmd/mobyextgen/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
func main() {
2929
service := flag.String("service", "", "fully qualified name of a non-Point gRPC service")
3030
flag.Usage = func() {
31-
fmt.Fprintln(flag.CommandLine.Output(), "usage: mobyextgen [-service package.Service] [dir]")
31+
_, _ = fmt.Fprintln(flag.CommandLine.Output(), "usage: mobyextgen [-service package.Service] [dir]")
3232
flag.PrintDefaults()
3333
}
3434
flag.Parse()

‎internal/launcher/process_linux_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
func TestPdeathsigKillsDirectChildWhenParentExits(t *testing.T) {
1919
statusR, statusW, err := os.Pipe()
2020
assert.NilError(t, err)
21-
defer statusR.Close()
21+
defer func() { assert.NilError(t, statusR.Close()) }()
2222

2323
cmd := exec.Command(os.Args[0])
2424
cmd.Env = launcherHelperEnv("pdeathsig-parent")

‎internal/launcher/process_unix_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func TestLaunchStartupWriteTimeout(t *testing.T) {
128128
func TestStopProcessKillsProcessGroupDescendant(t *testing.T) {
129129
statusR, statusW, err := os.Pipe()
130130
assert.NilError(t, err)
131-
defer statusR.Close()
131+
defer func() { assert.NilError(t, statusR.Close()) }()
132132

133133
cmd := exec.CommandContext(context.Background(), os.Args[0])
134134
cmd.Env = launcherHelperEnv("process-group-leader")

0 commit comments

Comments
 (0)