Repository: open-gpdb/yproxy
Pull request #141: Add linters to workflow
Author: login: EinKrebs
Created: 2025-04-25T10:28:01Z | Merged: 2025-04-28T13:15:34Z



Diff:
diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt
index 936ff26..f5cf99e 100644
--- a/.github/actions/spelling/excludes.txt
+++ b/.github/actions/spelling/excludes.txt
@@ -81,6 +81,7 @@
 \.zip$
 ^\.github/actions/spelling/
 ^\Q.github/workflows/spelling.yml\E$
+^\Qbuild.Dockerfile\E$
 ^test/regress/gpg/
 ignore$
 pkg/message/message.go
diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt
index a53678d..ea3656c 100644
--- a/.github/actions/spelling/expect.txt
+++ b/.github/actions/spelling/expect.txt
@@ -3,13 +3,14 @@ aboba
 ABRT
 AExpr
 aocs
+Appendf
 Atoi
 aws
 basebackups
 BConst
 buf
 buildpackage
-buildx
+Buildx
 caio
 cdsdsd
 cfg
@@ -17,6 +18,7 @@ Chk
 Cleartext
 clientpid
 clientpool
+cmdline
 Cmp
 cnf
 compat
@@ -24,6 +26,7 @@ Cred
 crypter
 Cstring
 ctx
+CURDIR
 datallowconn
 datname
 dattablespace
@@ -34,19 +37,27 @@ DEK
 devbin
 djewikdeowp
 dpkg
+dws
 EADDRINUSE
 Errflag
 Errorf
 Exca
+expvar
 Fatalf
 fbreak
 fileinfo
 filestorage
+fmtcheck
 gengeneric
 Getenv
 gettime
+gofmt
+gofmtcheck
+goimports
+golangci
 gomock
 gopkg
+govet
 goyacc
 gpdata
 gpdb
@@ -115,6 +126,7 @@ pid
 PITR
 postgres
 postgresql
+pprof
 println
 psql
 ptr
@@ -175,7 +187,7 @@ uint
 uintptr
 unixgram
 unk
-Unmarshal
+unmarshal
 unssuported
 untrash
 untrashified
@@ -183,6 +195,7 @@ untrashify
 USEC
 usr
 wal
+webserver
 WORKDIR
 workflows
 WRONLY
diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt
index 1be8537..83b4751 100644
--- a/.github/actions/spelling/patterns.txt
+++ b/.github/actions/spelling/patterns.txt
@@ -45,3 +45,6 @@
 
 # hex runs
 \b[0-9a-fA-F]{16,}\b
+
+# 'uses' in workflows
+uses:\s+[-a-zA-Z0-9_]+/[-a-zA-Z0-9_]+@.+
diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml
new file mode 100644
index 0000000..328a9fc
--- /dev/null
+++ b/.github/workflows/linters.yaml
@@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v7
+        with:
+          version: latest
+          args: --timeout=10m
+
+  goimports:
+    runs-on: ubuntu-latest
+    name: goimports check
+    steps:
+      - name: checkout
+        uses: actions/checkout@v4
+      - name: goimports check
+        uses: DarthBenro008/goimports-check-action@v0.2.0
+        with:
+          root-path: './' # The relative root path to run goimports
+          excludes: "./yacc/"
diff --git a/.golangci.yaml b/.golangci.yaml
new file mode 100644
index 0000000..0a2cae5
--- /dev/null
+++ b/.golangci.yaml
@@ -0,0 +1,8 @@
+version: "2"
+linters:
+  exclusions:
+    rules:
+      - path: 'pkg/core/parser'
+        linters:
+          - unused
+          - govet
\ No newline at end of file
diff --git a/Makefile b/Makefile
index b1c1bdb..5c4e4dd 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@
 GIT_REVISION=`git rev-parse --short HEAD`
 YPROXY_VERSION=`git describe --tags --abbrev=0`
 LDFLAGS=-ldflags "-X github.com/yezzey-gp/yproxy/pkg.GitRevision=${GIT_REVISION} -X github.com/yezzey-gp/yproxy/pkg.YproxyVersion=${YPROXY_VERSION}"
+GOFMT_FILES?=$$(find . -name '*.go' | grep -v .git | grep -v parser | grep -v vendor)
 
 ####################### BUILD #######################
 
@@ -30,3 +31,15 @@ version = $(shell git describe --tags --abbrev=0)
 package:
 	sed -i 's/YPROXY_VERSION/${version}/g' debian/changelog
 	dpkg-buildpackage -us -uc
+
+
+####################### LINTERS #######################
+
+fmt:
+	gofmt -w $(GOFMT_FILES)
+
+fmtcheck:
+	@sh -c "'$(CURDIR)/script/gofmtcheck.sh'"
+
+lint:
+	golangci-lint run --timeout=10m
diff --git a/cmd/client/main.go b/cmd/client/main.go
index 9650bd5..f227a3d 100644
--- a/cmd/client/main.go
+++ b/cmd/client/main.go
@@ -3,6 +3,7 @@ package main
 import (
 	"fmt"
 	"io"
+	"log"
 	"net"
 	"os"
 
@@ -62,9 +63,13 @@ func Runner(f func(net.Conn, *config.Instance, []string) error) func(*cobra.Comm
 			logLevel = instanceCnf.LogLevel
 		}
 
-		ylogger.UpdateZeroLogLevel(logLevel)
+		if err := ylogger.UpdateZeroLogLevel(logLevel); err != nil {
+			log.Printf("failed to update log level: %s\n", err)
+		}
 
-		defer con.Close()
+		defer func() {
+			_ = con.Close()
+		}()
 		return f(con, instanceCnf, args)
 	}
 }
@@ -238,10 +243,7 @@ func listFunc(con net.Conn, instanceCnf *config.Instance, args []string) error {
 
 	done := false
 	res := make([]*object.ObjectInfo, 0)
-	for {
-		if done {
-			break
-		}
+	for !done {
 		tp, body, err := r.ReadPacket()
 		if err != nil {
 			return err
@@ -336,10 +338,7 @@ func goolFunc(con net.Conn, instanceCnf *config.Instance, args []string) error {
 	r := proc.NewProtoReader(ycl)
 
 	done := false
-	for {
-		if done {
-			break
-		}
+	for !done {
 		tp, _, err := r.ReadPacket()
 		if err != nil {
 			return err
diff --git a/cmd/yproxy/main.go b/cmd/yproxy/main.go
index a5c98e4..37fbd30 100644
--- a/cmd/yproxy/main.go
+++ b/cmd/yproxy/main.go
@@ -1,6 +1,8 @@
 package main
 
 import (
+	"log"
+
 	"github.com/spf13/cobra"
 
 	"github.com/yezzey-gp/yproxy/config"
@@ -34,7 +36,9 @@ var rootCmd = &cobra.Command{
 		if logLevel == "" {
 			logLevel = instanceCnf.LogLevel
 		}
-		ylogger.UpdateZeroLogLevel(logLevel)
+		if err := ylogger.UpdateZeroLogLevel(logLevel); err != nil {
+			log.Printf("failed to update log level: %s\n", err)
+		}
 
 		return instance.Run(instanceCnf)
 	},
diff --git a/pkg/backups/s3.go b/pkg/backups/s3.go
index d4a75e9..32b920a 100644
--- a/pkg/backups/s3.go
+++ b/pkg/backups/s3.go
@@ -17,7 +17,7 @@ type StorageBackupInteractor struct {
 // get lsn of the oldest backup
 func (b *StorageBackupInteractor) GetFirstLSN(seg uint64) (uint64, error) {
 	objects, err := b.Storage.ListPath(fmt.Sprintf("segments_005/seg%d/basebackups_005/", seg), true, nil)
-	if err != nil {	
+	if err != nil {
 		ylogger.Zero.Debug().Err(err).Msg("GetFirstLSN: list result")
 		return 0, err
 	}
diff --git a/pkg/clientpool/clientpool.go b/pkg/clientpool/clientpool.go
index 119a5e6..d0657a7 100644
--- a/pkg/clientpool/clientpool.go
+++ b/pkg/clientpool/clientpool.go
@@ -81,14 +81,14 @@ func (c *PoolImpl) Pop(id uint) (bool, error) {
 		total := cl.ByteOffset()
 		if total > 0 {
 			ct := SizeToCat(total)
-			timeTotal := time.Now().Sub(cl.OPStart()).Nanoseconds()
+			timeTotal := time.Since(cl.OPStart()).Nanoseconds()
 
 			optyp := cl.OPType().String()
 			if c.opSpeed[ct][optyp] == nil {
 				c.opSpeed[ct][optyp], _ = tdigest.New()
 			}
 
-			c.opSpeed[ct][optyp].Add(float64(total) / float64(timeTotal))
+			_ = c.opSpeed[ct][optyp].Add(float64(total) / float64(timeTotal))
 		}
 
 		delete(c.pool, id)
@@ -132,9 +132,9 @@ func NewClientPool() Pool {
 		pool: map[uint]client.YproxyClient{},
 		mu:   sync.Mutex{},
 		opSpeed: map[int]map[string]*tdigest.TDigest{
-			0: map[string]*tdigest.TDigest{},
-			1: map[string]*tdigest.TDigest{},
-			2: map[string]*tdigest.TDigest{},
+			0: {},
+			1: {},
+			2: {},
 		},
 	}
 }
diff --git a/pkg/core/core.go b/pkg/core/core.go
index b157f7c..ee6d578 100644
--- a/pkg/core/core.go
+++ b/pkg/core/core.go
@@ -40,7 +40,7 @@ func NewInstance() *Instance {
 
 func (i *Instance) DispatchServer(listener net.Listener, server func(net.Conn)) {
 	go func() {
-		defer listener.Close()
+		defer func() { _ = listener.Close() }()
 		for {
 			clConn, err := listener.Accept()
 			if err != nil {
@@ -117,15 +117,17 @@ func (i *Instance) Run(instanceCnf *config.Instance) error {
 		}
 
 		i.DispatchServer(statListener, func(clConn net.Conn) {
-			defer clConn.Close()
+			defer func() { _ = clConn.Close() }()
 
-			clConn.Write([]byte("Hello from stats server!!\n"))
-			clConn.Write([]byte("Client id | Optype | External Path \n"))
+			_, _ = clConn.Write([]byte("Hello from stats server!!\n"))
+			_, _ = clConn.Write([]byte("Client id | Optype | External Path \n"))
 
-			i.pool.ClientPoolForeach(func(cl client.YproxyClient) error {
-				_, err := clConn.Write([]byte(fmt.Sprintf("%v | %v | %v\n", cl.ID(), cl.OPType(), cl.ExternalFilePath())))
+			if err := i.pool.ClientPoolForeach(func(cl client.YproxyClient) error {
+				_, err := clConn.Write(fmt.Appendf(nil, "%v | %v | %v\n", cl.ID(), cl.OPType(), cl.ExternalFilePath()))
 				return err
-			})
+			}); err != nil {
+				ylogger.Zero.Error().Err(err).Msg("failed to write client stats data")
+			}
 		})
 	}
 
@@ -188,23 +190,21 @@ func (i *Instance) Run(instanceCnf *config.Instance) error {
 	i.DispatchServer(listener, func(clConn net.Conn) {
 		activeConnections.Add(1)
 		defer activeConnections.Done()
-		defer clConn.Close()
+		defer func() { _ = clConn.Close() }()
 		ycl := client.NewYClient(clConn)
-		i.pool.Put(ycl)
+		if err := i.pool.Put(ycl); err != nil {
+			// ?? wtf
+			ylogger.Zero.Debug().Uint("id", ycl.ID()).Err(err).Msg("error puting client to pool")
+		}
 		if err := proc.ProcConn(s, bs, cr, ycl, &instanceCnf.VacuumCnf); err != nil {
 			ylogger.Zero.Debug().Uint("id", ycl.ID()).Err(err).Msg("error serving client")
 		}
-		_, err := i.pool.Pop(ycl.ID())
-		if err != nil {
+		if _, err := i.pool.Pop(ycl.ID()); err != nil {
 			// ?? wtf
 			ylogger.Zero.Debug().Uint("id", ycl.ID()).Err(err).Msg("error erasing client from pool")
 		}
 	})
 
-	if err != nil {
-		return err
-	}
-
 	for iclistener == nil {
 		select {
 		case <-retryTicker.C:
@@ -230,7 +230,7 @@ func (i *Instance) Run(instanceCnf *config.Instance) error {
 	i.DispatchServer(iclistener, func(clConn net.Conn) {
 		activeConnections.Add(1)
 		defer activeConnections.Done()
-		defer clConn.Close()
+		defer func() { _ = clConn.Close() }()
 		ycl := client.NewYClient(clConn)
 		r := proc.NewProtoReader(ycl)
 
@@ -245,7 +245,7 @@ func (i *Instance) Run(instanceCnf *config.Instance) error {
 			msg := message.ReadyForQueryMessage{}
 			_, _ = ycl.GetRW().Write(msg.Encode())
 		default:
-			ycl.ReplyError(fmt.Errorf("wrong message type"), "")
+			_ = ycl.ReplyError(fmt.Errorf("wrong message type"), "")
 
 		}
 		ylogger.Zero.Debug().Msg("interconnection closed")
@@ -258,11 +258,11 @@ func (i *Instance) Run(instanceCnf *config.Instance) error {
 			return err
 		}
 	}
-	notifier.Ready()
+	_ = notifier.Ready()
 
 	go func() {
 		for {
-			notifier.Notify()
+			_ = notifier.Notify()
 			time.Sleep(sdnotifier.Timeout)
 		}
 	}()
@@ -274,6 +274,6 @@ func (i *Instance) Run(instanceCnf *config.Instance) error {
 
 func reusePort(network, address string, conn syscall.RawConn) error {
 	return conn.Control(func(descriptor uintptr) {
-		syscall.SetsockoptInt(int(descriptor), unix.SOL_SOCKET, unix.SO_REUSEADDR|unix.SO_REUSEPORT, 1)
+		_ = syscall.SetsockoptInt(int(descriptor), unix.SOL_SOCKET, unix.SO_REUSEADDR|unix.SO_REUSEPORT, 1)
 	})
 }
diff --git a/pkg/core/pg/pg.go b/pkg/core/pg/pg.go
index b7425c3..8aab9a6 100644
--- a/pkg/core/pg/pg.go
+++ b/pkg/core/pg/pg.go
@@ -18,7 +18,7 @@ import (
 )
 
 func PostgresIface(cl net.Conn, p clientpool.Pool, instanceStart time.Time, s storage.StorageInteractor) {
-	defer cl.Close()
+	defer func() { _ = cl.Close() }()
 
 	conn := pgproto3.NewBackend(cl, cl)
 
@@ -48,18 +48,18 @@ init:
 
 	/* send auth ok */
 	conn.Send(&pgproto3.AuthenticationCleartextPassword{})
-	conn.Flush()
+	_ = conn.Flush()
 	_, err := conn.Receive()
 	if err != nil {
 		ylogger.Zero.Error().Err(err).Msg("failed to complete AUTH")
 		return
 	}
 	conn.Send(&pgproto3.AuthenticationOk{})
-	conn.Flush()
+	_ = conn.Flush()
 	conn.Send(&pgproto3.ReadyForQuery{
 		TxStatus: 'I',
 	})
-	conn.Flush()
+	_ = conn.Flush()
 
 	/* main cycle */
 
@@ -82,7 +82,7 @@ init:
 					Message: fmt.Sprintf("failed to parse query: %v", err),
 				})
 				conn.Send(&pgproto3.ReadyForQuery{})
-				conn.Flush()
+				_ = conn.Flush()
 				continue
 			}
 
@@ -107,7 +107,7 @@ init:
 				conn.Send(&pgproto3.ReadyForQuery{
 					TxStatus: 'I',
 				})
-				conn.Flush()
+				_ = conn.Flush()
 			case *parser.ShowCommand:
 				_ = ProcessShow(conn, q.Type, p, instanceStart)
 			case *parser.CopyCommand:
@@ -128,7 +128,7 @@ init:
 				conn.Send(&pgproto3.ReadyForQuery{
 					TxStatus: 'I',
 				})
-				conn.Flush()
+				_ = conn.Flush()
 			case *parser.KKBCommand:
 				ylogger.Zero.Error().Msg("received die command, exiting")
 
@@ -149,7 +149,7 @@ init:
 				conn.Send(&pgproto3.ReadyForQuery{
 					TxStatus: 'I',
 				})
-				conn.Flush()
+				_ = conn.Flush()
 				/* TDB: remove this crutch */
 				time.Sleep(time.Second * 5)
 				os.Exit(2)
@@ -161,7 +161,7 @@ init:
 				conn.Send(&pgproto3.ReadyForQuery{
 					TxStatus: 'I',
 				})
-				conn.Flush()
+				_ = conn.Flush()
 			}
 
 		default:
diff --git a/pkg/database/database.go b/pkg/database/database.go
index cdd0de7..a97594a 100644
--- a/pkg/database/database.go
+++ b/pkg/database/database.go
@@ -41,7 +41,7 @@ func checkVersion(c *pgx.Conn, exp string) (bool, error) {
 	defer rows.Close()
 	ylogger.Zero.Debug().Msg("executed select")
 
-	for rows.Next() {
+	if rows.Next() {
 		var ver string
 		if err := rows.Scan(&ver); err != nil {
 			return false, fmt.Errorf("unable to parse query output %v", err)
@@ -63,7 +63,7 @@ func (database *DatabaseHandler) GetVirtualExpireIndex(port uint64, db DB, virtu
 	if err != nil {
 		return err
 	}
-	defer conn.Close() //error
+	defer func() { _ = conn.Close() }() //error
 	ylogger.Zero.Debug().Str("database name", db.name).Msg("GetVirtualExpireIndex: connected to database")
 
 	/* Todo: check that yezzey version >= 1.8.4 */
@@ -120,31 +120,23 @@ func (database *DatabaseHandler) GetNextLSN(port uint64, dbname string) (uint64,
 	if err != nil {
 		return 0, err
 	}
-	defer conn.Close() //error
+	defer func() { _ = conn.Close() }() //error
 	ylogger.Zero.Debug().Str("database name", dbname).Msg("GetNextLSN: connected to database")
 
-	rows, err := conn.Query(`select pg_current_xlog_location();`)
-	if err != nil {
-		return 0, fmt.Errorf("unable to next lsn %v", err) //fix
-	}
-	defer rows.Close()
+	dbRow := conn.QueryRow(`select pg_current_xlog_location();`)
 	ylogger.Zero.Debug().Msg("executed select")
 
-	for rows.Next() {
-		row := LSN{}
-		if err := rows.Scan(&row.lsn); err != nil {
-			return 0, fmt.Errorf("unable to parse query output %v", err)
-		}
-		lsn, err := pgx.ParseLSN(row.lsn)
-		if err != nil {
-			return 0, fmt.Errorf("unable to parse query output %v", err)
-		}
-
-		ylogger.Zero.Debug().Uint64("lsn", lsn).Msg("received lsn")
-		return lsn, nil
+	row := LSN{}
+	if err := dbRow.Scan(&row.lsn); err != nil {
+		return 0, fmt.Errorf("unable to parse query output %v", err)
 	}
-	// unexcepted
-	return 0, fmt.Errorf("unexpected error while getting next lsn")
+	lsn, err := pgx.ParseLSN(row.lsn)
+	if err != nil {
+		return 0, fmt.Errorf("unable to parse query output %v", err)
+	}
+
+	ylogger.Zero.Debug().Uint64("lsn", lsn).Msg("received lsn")
+	return lsn, nil
 }
 
 func (database *DatabaseHandler) GetVirtualExpireIndexes(port uint64) (map[string]bool, map[string]uint64, error) { //TODO несколько баз
@@ -200,7 +192,7 @@ func getDatabase(port uint64) ([]DB, error) {
 	if err != nil {
 		return nil, err
 	}
-	defer conn.Close() //error
+	defer func() { _ = conn.Close() }() //error
 	ylogger.Zero.Debug().Msg("connected to db")
 	rows, err := conn.Query(`SELECT dattablespace, oid, datname FROM pg_database WHERE datallowconn;`)
 	if err != nil {
@@ -226,7 +218,7 @@ func getDatabase(port uint64) ([]DB, error) {
 		if err != nil {
 			return nil, err
 		}
-		defer connDb.Close() //error
+		defer func() { _ = connDb.Close() }() //error
 		ylogger.Zero.Debug().Msg("cycle 3")
 
 		rowsdb, err := connDb.Query(`SELECT exists(SELECT * FROM information_schema.schemata WHERE schema_name='yezzey');`)
diff --git a/pkg/proc/interaction.go b/pkg/proc/interaction.go
index 50ae913..f16d8ad 100644
--- a/pkg/proc/interaction.go
+++ b/pkg/proc/interaction.go
@@ -33,7 +33,7 @@ func ProcessCatExtended(
 
 	var contentReader io.Reader
 	contentReader = yr
-	defer yr.Close()
+	defer func() { _ = yr.Close() }()
 	var err error
 
 	if decrypt {
@@ -58,7 +58,9 @@ func ProcessCatExtended(
 	}
 
 	if startOffset != 0 {
-		io.CopyN(io.Discard, contentReader, int64(startOffset))
+		if _, err := io.CopyN(io.Discard, contentReader, int64(startOffset)); err != nil {
+			return err
+		}
 	}
 
 	n, err := io.Copy(ycl.GetRW(), contentReader)
@@ -85,8 +87,8 @@ func ProcessPutExtended(
 
 	w = yio.NewYproxyWriter(w, ycl)
 
-	defer r.Close()
-	defer w.Close()
+	defer func() { _ = r.Close() }()
+	defer func() { _ = w.Close() }()
 
 	wg := sync.WaitGroup{}
 	wg.Add(1)
@@ -94,7 +96,7 @@ func ProcessPutExtended(
 	go func() {
 		defer wg.Done()
 
-		var ww io.WriteCloser = w
+		ww := w
 		if encrypt {
 			if cr == nil {
 				ylogger.Zero.Error().Err(fmt.Errorf("failed to encrypt, crypter not configured")).Str("path", name).Msg("connection aborted")
@@ -270,7 +272,7 @@ func ProcessCopyExtended(
 		if err != nil {
 			return err
 		}
-		ssCopy := !(encrypt || decrypt) || (encrypt && decrypt && eq)
+		ssCopy := (!encrypt && !decrypt) || (encrypt && decrypt && eq)
 
 		var failed []*object.ObjectInfo
 		retryCount := 0
@@ -284,7 +286,7 @@ func ProcessCopyExtended(
 			for i := range len(objectMetas) {
 				path := strings.TrimPrefix(objectMetas[i].Path, instanceCnf.StorageCnf.StoragePrefix)
 
-				sem.Acquire(context.TODO(), 1)
+				_ = sem.Acquire(context.TODO(), 1)
 				wg.Add(1)
 
 				go func(i int) {
@@ -305,7 +307,7 @@ func ProcessCopyExtended(
 					readerFromOldBucket := yio.NewYRetryReader(yio.NewRestartReader(oldStorage, path, nil), ycl)
 					var fromReader io.Reader
 					fromReader = readerFromOldBucket
-					defer readerFromOldBucket.Close()
+					defer func() { _ = readerFromOldBucket.Close() }()
 
 					if decrypt {
 						oldCr, err := crypt.NewCrypto(&instanceCnf.CryptoCnf)
@@ -543,7 +545,7 @@ func ProcessCollectObsolete(msg message.CollectObsoleteMessage, s storage.Storag
 		_ = ycl.ReplyError(err, "failed connect to db")
 		return err
 	}
-	defer conn.Close()
+	defer func() { _ = conn.Close() }()
 	for _, v := range files {
 		_, ok := vi[v.Path]
 		if ok {
@@ -590,10 +592,10 @@ func ProcessDeleteObsolete(msg message.DeleteObsoleteMessage, s storage.StorageI
 		ylogger.Zero.Error().Err(err).Msg("ProcessDeleteObsolete: get connection")
 		return err
 	}
-	defer conn.Close()
+	defer func() { _ = conn.Close() }()
 
 	for str, v := range ei {
-		ylogger.Zero.Error().Str("delete candidate", str).Uint64("expire lsn", v).Uint64("fblsn", first_backup_lsn).Msg("checking lsn")
+		ylogger.Zero.Error().Str("delete candidate", str).Uint64("expire lsn", v).Uint64("first backup lsn", first_backup_lsn).Msg("checking lsn")
 		if v >= first_backup_lsn {
 			continue
 		}
diff --git a/pkg/storage/filestorage.go b/pkg/storage/filestorage.go
index 109dc57..52cdf77 100644
--- a/pkg/storage/filestorage.go
+++ b/pkg/storage/filestorage.go
@@ -67,7 +67,9 @@ func (s *FileStorageInteractor) ListPath(prefix string, _ bool, _ []settings.Sto
 func (s *FileStorageInteractor) PutFileToDest(name string, r io.Reader, _ []settings.StorageSettings) error {
 	fPath := path.Join(s.cnf.StoragePrefix, name)
 	fDir := path.Dir(fPath)
-	os.MkdirAll(fDir, 0700)
+	if err := os.MkdirAll(fDir, 0700); err != nil {
+		return err
+	}
 	file, err := os.Create(fPath)
 	if err != nil {
 		return err
@@ -85,7 +87,9 @@ func (s *FileStorageInteractor) MoveObject(from string, to string) error {
 	fromPath := path.Join(s.cnf.StoragePrefix, from)
 	toPath := path.Join(s.cnf.StoragePrefix, to)
 	toDir := path.Dir(toPath)
-	os.MkdirAll(toDir, 0700)
+	if err := os.MkdirAll(toDir, 0700); err != nil {
+		return err
+	}
 	return os.Rename(fromPath, toPath)
 }
 
@@ -93,7 +97,9 @@ func (s *FileStorageInteractor) CopyObject(from, to, fromStoragePrefix, _ string
 	fromPath := path.Join(fromStoragePrefix, from)
 	toPath := path.Join(s.cnf.StoragePrefix, to)
 	toDir := path.Dir(toPath)
-	os.MkdirAll(toDir, 0700)
+	if err := os.MkdirAll(toDir, 0700); err != nil {
+		return err
+	}
 	fromFile, err := os.Open(fromPath)
 	if err != nil {
 		return err
diff --git a/pkg/storage/s3storage.go b/pkg/storage/s3storage.go
index f6a2e17..a2dcaf1 100644
--- a/pkg/storage/s3storage.go
+++ b/pkg/storage/s3storage.go
@@ -366,7 +366,7 @@ func putInCache(storageId string, objs []*object.ObjectInfo) error {
 	if err != nil {
 		return err
 	}
-	defer f.Close()
+	defer func() { _ = f.Close() }()
 	content, err := io.ReadAll(f)
 	if err != nil {
 		return err
@@ -411,7 +411,7 @@ func readCache(cfg config.Storage, prefix string) ([]*object.ObjectInfo, error)
 	if err != nil {
 		return nil, err
 	}
-	defer f.Close()
+	defer func() { _ = f.Close() }()
 	content, err := io.ReadAll(f)
 	if err != nil {
 		return nil, err
diff --git a/pkg/storage/s3storage_test.go b/pkg/storage/s3storage_test.go
index 426eb15..6d3a596 100644
--- a/pkg/storage/s3storage_test.go
+++ b/pkg/storage/s3storage_test.go
@@ -14,8 +14,8 @@ func TestCache(t *testing.T) {
 
 	f, err := os.CreateTemp("", "*")
 	assert.NoError(err)
-	defer os.Remove(f.Name())
-	defer f.Close()
+	defer func() { _ = os.Remove(f.Name()) }()
+	defer func() { _ = f.Close() }()
 
 	config.InstanceConfig().ProxyCnf.BucketCachePath = f.Name()
 
diff --git a/pkg/storage/sessionpool.go b/pkg/storage/sessionpool.go
index 3322b34..15da5c6 100644
--- a/pkg/storage/sessionpool.go
+++ b/pkg/storage/sessionpool.go
@@ -104,7 +104,7 @@ func (sp *S3SessionPool) createSession() (*session.Session, error) {
 func requestEndpoint(endpointSource, port string) (string, error) {
 	ylogger.Zero.Debug().Str("source host", endpointSource).Msg("requesting storage endpoint")
 	t := http.DefaultTransport
-	var c *http.Client = http.DefaultClient
+	c := http.DefaultClient
 	if tr, ok := t.(*http.Transport); ok {
 		tr.DisableKeepAlives = true
 		c = &http.Client{Transport: tr}
@@ -131,7 +131,7 @@ func requestEndpoint(endpointSource, port string) (string, error) {
 }
 
 func (s *S3SessionPool) GetSession(ctx context.Context) (*s3.S3, error) {
-	s.sem.Acquire(ctx, 1)
+	_ = s.sem.Acquire(ctx, 1)
 	s.usedConnections.Add(1)
 	defer func() {
 		s.sem.Release(1)
diff --git a/script/gofmtcheck.sh b/script/gofmtcheck.sh
new file mode 100755
index 0000000..64e47b0
--- /dev/null
+++ b/script/gofmtcheck.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Check gofmt
+echo "==> Checking that code complies with gofmt requirements..."
+gofmt_files=$(gofmt -l `find . -name '*.go' | grep -v parser | grep -v yacc | grep -v .git`)
+if [[ -n ${gofmt_files} ]]; then
+    echo 'gofmt needs running on the following files:'
+    echo "${gofmt_files}"
+    echo "You can use the command: \`make fmt\` to reformat code."
+    exit 1
+fi
+echo "OK"
+
+
+exit 0
\ No newline at end of file


Reviews:
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T10:28:53Z
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T11:09:32Z
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T11:16:50Z
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T11:22:42Z
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T11:40:30Z
user: login: diPhantxm
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T13:13:30Z

Review comments:
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[fmtcheck](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2835)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[fmtcheck](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2841)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[golangci](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2836)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[golangci](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2842)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[golangci](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2843)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Candidate Pattern

[Line](#security-tab) matches candidate pattern "\\\buses:\\\s+[-\\\w.\]+/[-\\\w./\]+@[-\\\w.\]+" \(candidate-pattern\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2837)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[golangci](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2844)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[golangci](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2845)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
+        with:
+          version: latest
+          args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console
+
+  goimports:
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[goimports](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2838)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
+        with:
+          version: latest
+          args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console
+
+  goimports:
+    runs-on: ubuntu-latest
+    name: goimports check
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[goimports](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2846)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
+        with:
+          version: latest
+          args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console
+
+  goimports:
+    runs-on: ubuntu-latest
+    name: goimports check
+    steps:
+      - name: checkout
+        uses: actions/checkout@v4
+      - name: goimports check
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[goimports](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2847)
created_at: 2025-04-25T10:28:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
+        with:
+          version: latest
+          args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console
+
+  goimports:
+    runs-on: ubuntu-latest
+    name: goimports check
+    steps:
+      - name: checkout
+        uses: actions/checkout@v4
+      - name: goimports check
+        uses: DarthBenro008/goimports-check-action@v0.2.0
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[Darth](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2839)
created_at: 2025-04-25T10:28:53Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
+        with:
+          version: latest
+          args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console
+
+  goimports:
+    runs-on: ubuntu-latest
+    name: goimports check
+    steps:
+      - name: checkout
+        uses: actions/checkout@v4
+      - name: goimports check
+        uses: DarthBenro008/goimports-check-action@v0.2.0
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[Benro](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2840)
created_at: 2025-04-25T10:28:53Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
+        with:
+          version: latest
+          args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console
+
+  goimports:
+    runs-on: ubuntu-latest
+    name: goimports check
+    steps:
+      - name: checkout
+        uses: actions/checkout@v4
+      - name: goimports check
+        uses: DarthBenro008/goimports-check-action@v0.2.0
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[goimports](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2848)
created_at: 2025-04-25T10:28:53Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v6
+        with:
+          version: latest
+          args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console
+
+  goimports:
+    runs-on: ubuntu-latest
+    name: goimports check
+    steps:
+      - name: checkout
+        uses: actions/checkout@v4
+      - name: goimports check
+        uses: DarthBenro008/goimports-check-action@v0.2.0
+        with:
+          root-path: './' # The relative root path to run goimports
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[goimports](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2849)
created_at: 2025-04-25T10:28:53Z
author_association: NONE
diff_hunk: @@ -2,6 +2,7 @@
 GIT_REVISION=`git rev-parse --short HEAD`
 YPROXY_VERSION=`git describe --tags --abbrev=0`
 LDFLAGS=-ldflags "-X github.com/yezzey-gp/yproxy/pkg.GitRevision=${GIT_REVISION} -X github.com/yezzey-gp/yproxy/pkg.YproxyVersion=${YPROXY_VERSION}"
+GOFMT_FILES?=$$(find . -name '*.go' | grep -v .git | grep -v parser | grep -v vendor)
path: Makefile
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[GOFMT](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2850)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -30,3 +31,15 @@
 package:
 	sed -i 's/YPROXY_VERSION/${version}/g' debian/changelog
 	dpkg-buildpackage -us -uc
+
+
+####################### LINTERS #######################
+
+fmt:
+	gofmt -w $(GOFMT_FILES)
path: Makefile
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[gofmt](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2851)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -30,3 +31,15 @@
 package:
 	sed -i 's/YPROXY_VERSION/${version}/g' debian/changelog
 	dpkg-buildpackage -us -uc
+
+
+####################### LINTERS #######################
+
+fmt:
+	gofmt -w $(GOFMT_FILES)
path: Makefile
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[GOFMT](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2856)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -30,3 +31,15 @@
 package:
 	sed -i 's/YPROXY_VERSION/${version}/g' debian/changelog
 	dpkg-buildpackage -us -uc
+
+
+####################### LINTERS #######################
+
+fmt:
+	gofmt -w $(GOFMT_FILES)
+
+fmtcheck:
+	@sh -c "'$(CURDIR)/script/gofmtcheck.sh'"
path: Makefile
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[CURDIR](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2852)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -30,3 +31,15 @@
 package:
 	sed -i 's/YPROXY_VERSION/${version}/g' debian/changelog
 	dpkg-buildpackage -us -uc
+
+
+####################### LINTERS #######################
+
+fmt:
+	gofmt -w $(GOFMT_FILES)
+
+fmtcheck:
+	@sh -c "'$(CURDIR)/script/gofmtcheck.sh'"
path: Makefile
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[gofmtcheck](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2853)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -119,13 +119,15 @@
 		i.DispatchServer(statListener, func(clConn net.Conn) {
 			defer clConn.Close()
 
-			clConn.Write([]byte("Hello from stats server!!\n"))
-			clConn.Write([]byte("Client id | Optype | External Path \n"))
+			_, _ = clConn.Write([]byte("Hello from stats server!!\n"))
+			_, _ = clConn.Write([]byte("Client id | Optype | External Path \n"))
 
-			i.pool.ClientPoolForeach(func(cl client.YproxyClient) error {
-				_, err := clConn.Write([]byte(fmt.Sprintf("%v | %v | %v\n", cl.ID(), cl.OPType(), cl.ExternalFilePath())))
+			if err := i.pool.ClientPoolForeach(func(cl client.YproxyClient) error {
+				_, err := clConn.Write(fmt.Appendf(nil, "%v | %v | %v\n", cl.ID(), cl.OPType(), cl.ExternalFilePath()))
path: pkg/core/core.go
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[Appendf](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2854)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -0,0 +1,15 @@
+#!/usr/bin/env bash
path: script/gofmtcheck.sh
user: login: github-advanced-security[bot]
body: ## Check File Path

[gofmtcheck](#security-tab) is not a recognized word. \(check-file-path\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2855)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Check gofmt
path: script/gofmtcheck.sh
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[gofmt](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2857)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Check gofmt
+echo "==> Checking that code complies with gofmt requirements..."
path: script/gofmtcheck.sh
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[gofmt](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2858)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Check gofmt
+echo "==> Checking that code complies with gofmt requirements..."
+gofmt_files=$(gofmt -l `find . -name '*.go' | grep -v parser | grep -v yacc | grep -v .git`)
path: script/gofmtcheck.sh
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[gofmt](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2859)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Check gofmt
+echo "==> Checking that code complies with gofmt requirements..."
+gofmt_files=$(gofmt -l `find . -name '*.go' | grep -v parser | grep -v yacc | grep -v .git`)
path: script/gofmtcheck.sh
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[gofmt](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2860)
created_at: 2025-04-25T11:09:31Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v7
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Candidate Pattern

[Line](#security-tab) matches candidate pattern "\\\buses:\\\s+[-\\\w.\]+/[-\\\w./\]+@[-\\\w.\]+" \(candidate-pattern\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2861)
created_at: 2025-04-25T11:16:50Z
author_association: NONE
diff_hunk: @@ -0,0 +1,50 @@
+name: linters
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions:
+  contents: read
+
+jobs:
+  fmtcheck:
+    name: go fmt check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: go fmt check
+        run: make fmtcheck
+
+  golangci:
+    name: golangci-lint
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: '1.23.0'
+          cache: false
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v7
path: .github/workflows/linters.yaml
user: login: github-advanced-security[bot]
body: ## Candidate Pattern

[Line](#security-tab) matches candidate pattern "\\\buses:\\\s+[-\\\w.\]+/[-\\\w./\]+@[-\\\w.\]+" \(candidate-pattern\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2862)
created_at: 2025-04-25T11:22:42Z
author_association: NONE
diff_hunk: @@ -0,0 +1,8 @@
+version: "2"
+linters:
+  exclusions:
+    rules:
+      - path: 'pkg/core/parser'
+        linters:
+          - unused
+          - govet
path: .golangci.yaml
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[govet](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/open-gpdb/yproxy/security/code-scanning/2863)
created_at: 2025-04-25T11:40:30Z
author_association: NONE

PR comments:
user: login: github-actions[bot]
created_at: 2025-04-25T10:29:11Z
body: 
# @check-spelling-bot Report
## :red_circle: Please review
### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14662511910),  or :memo: job summary for details.

<details><summary>Unrecognized words (12)</summary>

```
Benro
cmdline
Darth
dws
expvar
fblsn
fmtcheck
goimports
golangci
pprof
unmarshal
webserver
```
</details>

<details><summary>These words are not needed and should be removed
</summary>Unmarshal 
</details><p></p>

<details><summary>Some files were automatically ignored :see_no_evil:</summary>

These sample patterns would exclude them:
```
^\Qbuild.Dockerfile\E$
```

You should consider adding them to:
```
.github/actions/spelling/excludes.txt
```

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use `patterns.txt` to exclude portions, add items to the dictionary (e.g. by adding them to `allow.txt`), or fix typos.
</details>

<details><summary>To accept these unrecognized words as correct, update file exclusions, and remove the previously acknowledged and now absent words,
you could run the following commands</summary>

... in a clone of the [git@github.com:open-gpdb/yproxy.git](https://github.com/open-gpdb/yproxy.git) repository
on the `codestyle-fixes` branch ([:information_source: how do I use this?](
https://docs.check-spelling.dev/Accepting-Suggestions)):

``` sh
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/open-gpdb/yproxy/actions/runs/14662511910/attempts/1'

```
</details>


**OR**

To have the bot accept them for you, comment in the PR quoting the following line:
@check-spelling-bot apply [updates](https://github.com/open-gpdb/yproxy/actions/runs/14662511910/attempts/1).


<details><summary>Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary</summary>

This includes both **expected items** (225) from .github/actions/spelling/expect.txt and **unrecognized words** (12)

Dictionary | Entries | Covers | Uniquely
-|-|-|-
[cspell:golang/dict/go.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/golang/dict/go.txt)|2099|14|4|
[cspell:node/dict/node.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/node/dict/node.txt)|891|14|2|
[cspell:php/dict/php.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/php/dict/php.txt)|1689|13|2|
[cspell:python/src/python/python-lib.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/python/src/python/python-lib.txt)|2417|12|1|
[cspell:dotnet/dict/dotnet.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/dotnet/dict/dotnet.txt)|405|6||

Consider adding them (in `.github/workflows/spelling.yaml`) in `jobs:`/`spelling:` for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
      with:
        extra_dictionaries: |
          cspell:golang/dict/go.txt
          cspell:node/dict/node.txt
          cspell:php/dict/php.txt
          cspell:python/src/python/python-lib.txt
          cspell:dotnet/dict/dotnet.txt
```
To stop checking additional dictionaries, add (in `.github/workflows/spelling.yaml`) for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
check_extra_dictionaries: ''
```

</details>
<details><summary>Pattern suggestions :scissors: (9)</summary>

You could add these patterns to `.github/actions/spelling/patterns.txt`:
```
# Automatically suggested patterns

# hit-count: 13 file-count: 8
# https/http/file urls
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]

# hit-count: 4 file-count: 4
# uuencoded
[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]{40,}

# hit-count: 4 file-count: 2
# C network byte conversions
(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()

# hit-count: 4 file-count: 1
# container images
image: [-\w./:@]+

# hit-count: 3 file-count: 2
# GitHub actions
\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+

# hit-count: 1 file-count: 1
# scala imports
^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+

# hit-count: 1 file-count: 1
# Debian changelog severity
[-\w]+ \(.*\) (?:\w+|baseline|unstable|experimental); urgency=(?:low|medium|high|emergency|critical)\b

# hit-count: 1 file-count: 1
# Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker`
(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})

# hit-count: 1 file-count: 1
# Compiler flags (Windows / PowerShell)
# This is a subset of the more general compiler flags pattern.
# It avoids matching `-Path` to prevent it from being treated as `ath`
(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))

```

</details>

<details><summary>Errors (3)</summary>

#### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14662511910),  or :memo: job summary for details.

[:x: Errors](https://docs.check-spelling.dev/Event-descriptions) | Count
-|-
[:warning: binary-file](https://docs.check-spelling.dev/Event-descriptions#binary-file) | 1
[:information_source: candidate-pattern](https://docs.check-spelling.dev/Event-descriptions#candidate-pattern) | 15
[:x: check-file-path](https://docs.check-spelling.dev/Event-descriptions#check-file-path) | 1

See [:x: Event descriptions](https://docs.check-spelling.dev/Event-descriptions) for more information.

</details>

<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If the flagged items are :exploding_head: false positives</summary>

If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).

  Please add a file path to the `excludes.txt` file matching the containing file.

  File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

  `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).

* well-formed pattern.

  If you can write a [pattern](
https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
) that would match it,
  try adding it to the `patterns.txt` file.

  Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

  Note that patterns can't match multiline strings.

</details>

<!-- adoption information-->
:steam_locomotive: If you're seeing this message and your PR is from a branch that doesn't have check-spelling,
please merge to your PR's base branch to get the version configured for your repository.

author_association: NONE
user: login: github-actions[bot]
created_at: 2025-04-25T11:09:47Z
body: 
# @check-spelling-bot Report
## :red_circle: Please review
### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14663199860),  or :memo: job summary for details.

### Unrecognized words (4)

Appendf
CURDIR
gofmt
gofmtcheck

<details><summary>To accept these unrecognized words as correct,
you could run the following commands</summary>

... in a clone of the [git@github.com:open-gpdb/yproxy.git](https://github.com/open-gpdb/yproxy.git) repository
on the `codestyle-fixes` branch ([:information_source: how do I use this?](
https://docs.check-spelling.dev/Accepting-Suggestions)):

``` sh
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/open-gpdb/yproxy/actions/runs/14663199860/attempts/1'

```
</details>


**OR**

To have the bot accept them for you, comment in the PR quoting the following line:
@check-spelling-bot apply [updates](https://github.com/open-gpdb/yproxy/actions/runs/14663199860/attempts/1).


<details><summary>Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary</summary>

This includes both **expected items** (235) from .github/actions/spelling/expect.txt and **unrecognized words** (4)

Dictionary | Entries | Covers | Uniquely
-|-|-|-
[cspell:golang/dict/go.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/golang/dict/go.txt)|2099|14|4|
[cspell:node/dict/node.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/node/dict/node.txt)|891|14|2|
[cspell:php/dict/php.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/php/dict/php.txt)|1689|13|2|
[cspell:python/src/python/python-lib.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/python/src/python/python-lib.txt)|2417|12|1|
[cspell:dotnet/dict/dotnet.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/dotnet/dict/dotnet.txt)|405|6||

Consider adding them (in `.github/workflows/spelling.yaml`) in `jobs:`/`spelling:` for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
      with:
        extra_dictionaries: |
          cspell:golang/dict/go.txt
          cspell:node/dict/node.txt
          cspell:php/dict/php.txt
          cspell:python/src/python/python-lib.txt
          cspell:dotnet/dict/dotnet.txt
```
To stop checking additional dictionaries, add (in `.github/workflows/spelling.yaml`) for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
check_extra_dictionaries: ''
```

</details>
<details><summary>Pattern suggestions :scissors: (9)</summary>

You could add these patterns to `.github/actions/spelling/patterns.txt`:
```
# Automatically suggested patterns

# hit-count: 13 file-count: 8
# https/http/file urls
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]

# hit-count: 4 file-count: 4
# uuencoded
[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]{40,}

# hit-count: 4 file-count: 2
# C network byte conversions
(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()

# hit-count: 4 file-count: 1
# container images
image: [-\w./:@]+

# hit-count: 3 file-count: 2
# GitHub actions
\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+

# hit-count: 1 file-count: 1
# scala imports
^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+

# hit-count: 1 file-count: 1
# Debian changelog severity
[-\w]+ \(.*\) (?:\w+|baseline|unstable|experimental); urgency=(?:low|medium|high|emergency|critical)\b

# hit-count: 1 file-count: 1
# Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker`
(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})

# hit-count: 1 file-count: 1
# Compiler flags (Windows / PowerShell)
# This is a subset of the more general compiler flags pattern.
# It avoids matching `-Path` to prevent it from being treated as `ath`
(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))

```

</details>

<details><summary>Errors (2)</summary>

#### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14663199860),  or :memo: job summary for details.

[:x: Errors](https://docs.check-spelling.dev/Event-descriptions) | Count
-|-
[:information_source: candidate-pattern](https://docs.check-spelling.dev/Event-descriptions#candidate-pattern) | 15
[:x: check-file-path](https://docs.check-spelling.dev/Event-descriptions#check-file-path) | 1

See [:x: Event descriptions](https://docs.check-spelling.dev/Event-descriptions) for more information.

</details>

<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If the flagged items are :exploding_head: false positives</summary>

If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).

  Please add a file path to the `excludes.txt` file matching the containing file.

  File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

  `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).

* well-formed pattern.

  If you can write a [pattern](
https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
) that would match it,
  try adding it to the `patterns.txt` file.

  Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

  Note that patterns can't match multiline strings.

</details>

<!-- adoption information-->
:steam_locomotive: If you're seeing this message and your PR is from a branch that doesn't have check-spelling,
please merge to your PR's base branch to get the version configured for your repository.

author_association: NONE
user: login: github-actions[bot]
created_at: 2025-04-25T11:40:49Z
body: 
# @check-spelling-bot Report
## :red_circle: Please review
### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14663729708),  or :memo: job summary for details.

### Unrecognized words (2)

Buildx
govet

<details><summary>These words are not needed and should be removed
</summary>Benro buildx Darth 
</details><p></p>

<details><summary>To accept these unrecognized words as correct and remove the previously acknowledged and now absent words,
you could run the following commands</summary>

... in a clone of the [git@github.com:open-gpdb/yproxy.git](https://github.com/open-gpdb/yproxy.git) repository
on the `codestyle-fixes` branch ([:information_source: how do I use this?](
https://docs.check-spelling.dev/Accepting-Suggestions)):

``` sh
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/open-gpdb/yproxy/actions/runs/14663729708/attempts/1'

```
</details>


**OR**

To have the bot accept them for you, comment in the PR quoting the following line:
@check-spelling-bot apply [updates](https://github.com/open-gpdb/yproxy/actions/runs/14663729708/attempts/1).


<details><summary>Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary</summary>

This includes both **expected items** (239) from .github/actions/spelling/expect.txt and **unrecognized words** (2)

Dictionary | Entries | Covers | Uniquely
-|-|-|-
[cspell:golang/dict/go.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/golang/dict/go.txt)|2099|14|4|
[cspell:node/dict/node.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/node/dict/node.txt)|891|14|2|
[cspell:php/dict/php.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/php/dict/php.txt)|1689|13|2|
[cspell:python/src/python/python-lib.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/python/src/python/python-lib.txt)|2417|12|1|
[cspell:dotnet/dict/dotnet.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/dotnet/dict/dotnet.txt)|405|6||

Consider adding them (in `.github/workflows/spelling.yaml`) in `jobs:`/`spelling:` for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
      with:
        extra_dictionaries: |
          cspell:golang/dict/go.txt
          cspell:node/dict/node.txt
          cspell:php/dict/php.txt
          cspell:python/src/python/python-lib.txt
          cspell:dotnet/dict/dotnet.txt
```
To stop checking additional dictionaries, add (in `.github/workflows/spelling.yaml`) for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
check_extra_dictionaries: ''
```

</details>
<details><summary>Pattern suggestions :scissors: (8)</summary>

You could add these patterns to `.github/actions/spelling/patterns.txt`:
```
# Automatically suggested patterns

# hit-count: 13 file-count: 8
# https/http/file urls
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]

# hit-count: 4 file-count: 4
# uuencoded
[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]{40,}

# hit-count: 4 file-count: 2
# C network byte conversions
(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()

# hit-count: 4 file-count: 1
# container images
image: [-\w./:@]+

# hit-count: 1 file-count: 1
# scala imports
^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+

# hit-count: 1 file-count: 1
# Debian changelog severity
[-\w]+ \(.*\) (?:\w+|baseline|unstable|experimental); urgency=(?:low|medium|high|emergency|critical)\b

# hit-count: 1 file-count: 1
# Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker`
(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})

# hit-count: 1 file-count: 1
# Compiler flags (Windows / PowerShell)
# This is a subset of the more general compiler flags pattern.
# It avoids matching `-Path` to prevent it from being treated as `ath`
(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))

```

</details>

<details><summary>Notices (1)</summary>

#### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14663729708),  or :memo: job summary for details.

[:information_source: Notices](https://docs.check-spelling.dev/Event-descriptions) | Count
-|-
[:information_source: candidate-pattern](https://docs.check-spelling.dev/Event-descriptions#candidate-pattern) | 13

See [:information_source: Event descriptions](https://docs.check-spelling.dev/Event-descriptions) for more information.

</details>

<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If the flagged items are :exploding_head: false positives</summary>

If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).

  Please add a file path to the `excludes.txt` file matching the containing file.

  File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

  `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).

* well-formed pattern.

  If you can write a [pattern](
https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
) that would match it,
  try adding it to the `patterns.txt` file.

  Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

  Note that patterns can't match multiline strings.

</details>

<!-- adoption information-->
:steam_locomotive: If you're seeing this message and your PR is from a branch that doesn't have check-spelling,
please merge to your PR's base branch to get the version configured for your repository.

author_association: NONE
user: login: github-actions[bot]
created_at: 2025-04-25T14:20:28Z
body: 
# @check-spelling-bot Report
## :red_circle: Please review
### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14666773405),  or :memo: job summary for details.

### Unrecognized words (2)

Buildx
govet

<details><summary>These words are not needed and should be removed
</summary>Benro buildx Darth 
</details><p></p>

<details><summary>To accept these unrecognized words as correct and remove the previously acknowledged and now absent words,
you could run the following commands</summary>

... in a clone of the [git@github.com:open-gpdb/yproxy.git](https://github.com/open-gpdb/yproxy.git) repository
on the `codestyle-fixes` branch ([:information_source: how do I use this?](
https://docs.check-spelling.dev/Accepting-Suggestions)):

``` sh
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/open-gpdb/yproxy/actions/runs/14666773405/attempts/1'

```
</details>


**OR**

To have the bot accept them for you, comment in the PR quoting the following line:
@check-spelling-bot apply [updates](https://github.com/open-gpdb/yproxy/actions/runs/14666773405/attempts/1).


<details><summary>Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary</summary>

This includes both **expected items** (239) from .github/actions/spelling/expect.txt and **unrecognized words** (2)

Dictionary | Entries | Covers | Uniquely
-|-|-|-
[cspell:golang/dict/go.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/golang/dict/go.txt)|2099|14|4|
[cspell:node/dict/node.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/node/dict/node.txt)|891|14|2|
[cspell:php/dict/php.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/php/dict/php.txt)|1689|13|2|
[cspell:python/src/python/python-lib.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/python/src/python/python-lib.txt)|2417|12|1|
[cspell:dotnet/dict/dotnet.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/dotnet/dict/dotnet.txt)|405|6||

Consider adding them (in `.github/workflows/spelling.yaml`) in `jobs:`/`spelling:` for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
      with:
        extra_dictionaries: |
          cspell:golang/dict/go.txt
          cspell:node/dict/node.txt
          cspell:php/dict/php.txt
          cspell:python/src/python/python-lib.txt
          cspell:dotnet/dict/dotnet.txt
```
To stop checking additional dictionaries, add (in `.github/workflows/spelling.yaml`) for `uses: check-spelling/check-spelling@main` in its `with`:
``` yml
check_extra_dictionaries: ''
```

</details>
<details><summary>Pattern suggestions :scissors: (8)</summary>

You could add these patterns to `.github/actions/spelling/patterns.txt`:
```
# Automatically suggested patterns

# hit-count: 13 file-count: 8
# https/http/file urls
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]

# hit-count: 4 file-count: 4
# uuencoded
[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]{40,}

# hit-count: 4 file-count: 2
# C network byte conversions
(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()

# hit-count: 4 file-count: 1
# container images
image: [-\w./:@]+

# hit-count: 1 file-count: 1
# scala imports
^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+

# hit-count: 1 file-count: 1
# Debian changelog severity
[-\w]+ \(.*\) (?:\w+|baseline|unstable|experimental); urgency=(?:low|medium|high|emergency|critical)\b

# hit-count: 1 file-count: 1
# Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker`
(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})

# hit-count: 1 file-count: 1
# Compiler flags (Windows / PowerShell)
# This is a subset of the more general compiler flags pattern.
# It avoids matching `-Path` to prevent it from being treated as `ath`
(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))

```

</details>

<details><summary>Notices (1)</summary>

#### See the [:open_file_folder: files](https://github.com/open-gpdb/yproxy/pull/141/files/) view, the [:scroll:action log](https://github.com/open-gpdb/yproxy/actions/runs/14666773405),  or :memo: job summary for details.

[:information_source: Notices](https://docs.check-spelling.dev/Event-descriptions) | Count
-|-
[:information_source: candidate-pattern](https://docs.check-spelling.dev/Event-descriptions#candidate-pattern) | 13

See [:information_source: Event descriptions](https://docs.check-spelling.dev/Event-descriptions) for more information.

</details>

<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If the flagged items are :exploding_head: false positives</summary>

If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).

  Please add a file path to the `excludes.txt` file matching the containing file.

  File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

  `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).

* well-formed pattern.

  If you can write a [pattern](
https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
) that would match it,
  try adding it to the `patterns.txt` file.

  Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

  Note that patterns can't match multiline strings.

</details>

<!-- adoption information-->
:steam_locomotive: If you're seeing this message and your PR is from a branch that doesn't have check-spelling,
please merge to your PR's base branch to get the version configured for your repository.

author_association: NONE