on main help sign in
ci: make lint green
c88c941Andrey Nering
internal/client/proto.go+1
@@ -87,6 +87,7 @@ func (c *Client) DeleteWorkspace(ctx context.Context, id string) error {
87// SubscribeEvents subscribes to server-sent events for a workspace.
87// SubscribeEvents subscribes to server-sent events for a workspace.
88func (c *Client) SubscribeEvents(ctx context.Context, id string) (<-chan any, error) {
88func (c *Client) SubscribeEvents(ctx context.Context, id string) (<-chan any, error) {
89 events := make(chan any, 100)
89 events := make(chan any, 100)
90+ //nolint:bodyclose
90 rsp, err := c.get(ctx, fmt.Sprintf("/workspaces/%s/events", id), nil, http.Header{
91 rsp, err := c.get(ctx, fmt.Sprintf("/workspaces/%s/events", id), nil, http.Header{
91 "Accept": []string{"text/event-stream"},
92 "Accept": []string{"text/event-stream"},
92 "Cache-Control": []string{"no-cache"},
93 "Cache-Control": []string{"no-cache"},
internal/server/net_other.go+1
@@ -6,5 +6,6 @@ package server
6import "net"
6import "net"
7
7
8func listen(network, address string) (net.Listener, error) {
8func listen(network, address string) (net.Listener, error) {
9+ //nolint:noctx
9 return net.Listen(network, address)
10 return net.Listen(network, address)
10}
11}