aboutsummaryrefslogtreecommitdiff
path: root/brotli.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <Oleksandr_Redko@epam.com> 2023-11-24 12:33:04 +0200
committerGravatar GitHub <noreply@github.com> 2023-11-24 11:33:04 +0100
commitf196617f5598f05df49f2c15ffde70a9d908f292 (patch)
tree17029edd8643ee9c4026d188c5ce5edfe93b1141 /brotli.go
parentEnable wastedassign, whitespace linters; fix issues (#1665) (diff)
downloadfasthttp-f196617f5598f05df49f2c15ffde70a9d908f292.tar.gz
fasthttp-f196617f5598f05df49f2c15ffde70a9d908f292.tar.bz2
fasthttp-f196617f5598f05df49f2c15ffde70a9d908f292.zip
chore: Use 'any' instead of 'interface{}' (#1666)
gofmt -w -r "interface{} -> any" -l .
Diffstat (limited to 'brotli.go')
-rw-r--r--brotli.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/brotli.go b/brotli.go
index 032bd95..30b7d66 100644
--- a/brotli.go
+++ b/brotli.go
@@ -134,17 +134,17 @@ func WriteBrotliLevel(w io.Writer, p []byte, level int) (int, error) {
var (
stacklessWriteBrotliOnce sync.Once
- stacklessWriteBrotliFunc func(ctx interface{}) bool
+ stacklessWriteBrotliFunc func(ctx any) bool
)
-func stacklessWriteBrotli(ctx interface{}) {
+func stacklessWriteBrotli(ctx any) {
stacklessWriteBrotliOnce.Do(func() {
stacklessWriteBrotliFunc = stackless.NewFunc(nonblockingWriteBrotli)
})
stacklessWriteBrotliFunc(ctx)
}
-func nonblockingWriteBrotli(ctxv interface{}) {
+func nonblockingWriteBrotli(ctxv any) {
ctx := ctxv.(*compressCtx)
zw := acquireRealBrotliWriter(ctx.w, ctx.level)