From 86e0092bfad65e298ebb02ad7ed8f1a52c2d3ff3 Mon Sep 17 00:00:00 2001 From: Aleksey Myasnikov Date: Sun, 31 Dec 2023 03:18:38 +0300 Subject: [PATCH] nakedret enabled --- .golangci.yml | 1 - examples/pagination/cities.go | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index b458386b2..ee285f6c6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -238,7 +238,6 @@ linters: - ireturn - maintidx - maligned - - nakedret - nilerr - nlreturn - noctx diff --git a/examples/pagination/cities.go b/examples/pagination/cities.go index 40e7bf395..2fd8aa846 100644 --- a/examples/pagination/cities.go +++ b/examples/pagination/cities.go @@ -69,7 +69,7 @@ func selectPaging( }() if !res.NextResultSet(ctx) || !res.HasNextRow() { empty = true - return + return res.Err() } var addr string for res.NextRow() { @@ -86,10 +86,7 @@ func selectPaging( return res.Err() }, ) - if err != nil { - return - } - return empty, nil + return empty, err } func fillTableWithData(ctx context.Context, c table.Client, prefix string) (err error) {