Skip to content

Commit

Permalink
Missing bufio library
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandezBenjamin committed Sep 7, 2023
1 parent 7ab2f52 commit 9d5ea0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package server

import (
"bufio"
"context"
"crypto/rsa"
"encoding/json"
Expand Down Expand Up @@ -367,9 +368,9 @@ func newServer(ctx context.Context, c Config, rotationStrategy rotationStrategy)
bufferSizeMidldleware := func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w := bufio.NewWriterSize(w, 4096*2)

Check failure on line 370 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

no new variables on left side of :=

Check failure on line 370 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

cannot use bufio.NewWriterSize(w, 4096 * 2) (value of type *bufio.Writer) as "net/http".ResponseWriter value in assignment: *bufio.Writer does not implement "net/http".ResponseWriter (missing method Header)

Check failure on line 370 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

no new variables on left side of :=

Check failure on line 370 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

cannot use bufio.NewWriterSize(w, 4096 * 2) (value of type *bufio.Writer) as "net/http".ResponseWriter value in assignment: *bufio.Writer does not implement "net/http".ResponseWriter (missing method Header)
if w.Buffered() > 0 {
w.Flush()
}
if w.Buffered() > 0{

Check failure on line 371 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

w.Buffered undefined (type "net/http".ResponseWriter has no field or method Buffered)

Check failure on line 371 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

w.Buffered undefined (type "net/http".ResponseWriter has no field or method Buffered)
w.Flush()

Check failure on line 372 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

w.Flush undefined (type "net/http".ResponseWriter has no field or method Flush)) (typecheck)

Check failure on line 372 in server/server.go

View workflow job for this annotation

GitHub Actions / Lint

w.Flush undefined (type "net/http".ResponseWriter has no field or method Flush) (typecheck)
}
next.ServeHTTP(w, r)
})
}
Expand Down

0 comments on commit 9d5ea0e

Please sign in to comment.