diff options
author | Oleksandr Redko <Oleksandr_Redko@epam.com> | 2024-01-04 16:05:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 15:05:38 +0100 |
commit | 28615eba5594af29737938ae5cece50d7cba0a17 (patch) | |
tree | efb48c34b0d4372bdbbe4f89a06b7d3fb05baf75 /expvarhandler | |
parent | chore: move cookie fuzz test to go 1.18 fuzzing (#1686) (diff) | |
download | fasthttp-28615eba5594af29737938ae5cece50d7cba0a17.tar.gz fasthttp-28615eba5594af29737938ae5cece50d7cba0a17.tar.bz2 fasthttp-28615eba5594af29737938ae5cece50d7cba0a17.zip |
Change empty string checks to be more idiomatic (#1684)
Diffstat (limited to 'expvarhandler')
-rw-r--r-- | expvarhandler/expvar.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/expvarhandler/expvar.go b/expvarhandler/expvar.go index 796954d..b750261 100644 --- a/expvarhandler/expvar.go +++ b/expvarhandler/expvar.go @@ -53,7 +53,7 @@ func ExpvarHandler(ctx *fasthttp.RequestCtx) { func getExpvarRegexp(ctx *fasthttp.RequestCtx) (*regexp.Regexp, error) { r := string(ctx.QueryArgs().Peek("r")) - if len(r) == 0 { + if r == "" { return defaultRE, nil } rr, err := regexp.Compile(r) |