Skip to content

Commit f780287

Browse files
committed
Fix golangci-lint
1 parent fba972f commit f780287

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ func main() {
1313
log.SetFlags(log.Flags() &^ (log.Ldate | log.Ltime))
1414
}
1515

16-
cmd.Root().Execute()
16+
_ = cmd.Root().Execute()
1717
}

pkg/server/server.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (s *Server) handle(conn net.Conn, connected time.Time) {
175175

176176
chClosed := make(chan struct{})
177177
go func() {
178-
io.Copy(io.Discard, conn)
178+
_, _ = io.Copy(io.Discard, conn)
179179
close(chClosed)
180180
}()
181181

@@ -358,13 +358,15 @@ func PrintConnections(w io.Writer, infos []ConnectionInfo) error {
358358
if info.QueuePos > 0 {
359359
status = fmt.Sprintf("Queued (%d)", info.QueuePos)
360360
}
361-
table.Append([]string{
361+
if err := table.Append([]string{
362362
strconv.FormatUint(info.Index, 10),
363363
assembleRemote(info.RemoteAddr, info.RemotePort),
364364
strings.TrimSuffix(info.Path, "/git-upload-pack"),
365365
status,
366366
info.Connected.Format(time.DateTime),
367-
})
367+
}); err != nil {
368+
return fmt.Errorf("table.Append: %w", err)
369+
}
368370
}
369371
return table.Render()
370372
}

0 commit comments

Comments
 (0)