enable godot, misspell linters

This commit is contained in:
onyx-and-iris 2026-02-15 17:14:34 +00:00
parent f6ea67b88c
commit fc6ac8fa4e
5 changed files with 10 additions and 7 deletions

5
.gitignore vendored
View File

@ -25,4 +25,7 @@ go.work
# End of gignore: github.com/onyx-and-iris/gignore
# Added by goreleaser init:
dist/
dist/
# env files
.envrc

View File

@ -6,7 +6,7 @@ run:
go: '1.24'
linters:
disable: [errcheck, godot, misspell]
disable: [errcheck]
enable:
# Default enabled linters
- errcheck # Check for unchecked errors

View File

@ -114,7 +114,7 @@ func main() {
log.Fatal(cmd.Run(context.Background(), os.Args))
}
// launchProxy initializes the UDP proxy server with the given configuration.
// launchProxy initialises the UDP proxy server with the given configuration.
// It listens on the specified proxy host and port, and forwards traffic to the target host and port.
// server.ListenAndServe blocks until the server is stopped or an error occurs.
func launchProxy(cfg proxyConfig, errChan chan<- error) {
@ -131,7 +131,7 @@ func launchProxy(cfg proxyConfig, errChan chan<- error) {
return
}
log.Printf("q3rcon-proxy initialized: [proxy] (%s) [target] (%s)", hostAddr, proxyAddr)
log.Printf("q3rcon-proxy initialised: [proxy] (%s) [target] (%s)", hostAddr, proxyAddr)
errChan <- server.ListenAndServe()
}

View File

@ -9,7 +9,7 @@ import (
// Option is a functional option type that allows us to configure the Client.
type Option func(*Client)
// WithSessionTimeout is a functional option to set the session timeout
// WithSessionTimeout is a functional option to set the session timeout.
func WithSessionTimeout(timeout time.Duration) Option {
return func(c *Client) {
if timeout < time.Minute {

View File

@ -2,7 +2,7 @@ package udpproxy
import "sync"
// sessionCache tracks connection sessions
// sessionCache tracks connection sessions.
type sessionCache struct {
mu sync.RWMutex
data map[string]*session
@ -15,7 +15,7 @@ func newSessionCache() sessionCache {
}
}
// read returns the associated session for an addr
// read returns the associated session for an addr.
func (sc *sessionCache) read(addr string) (*session, bool) {
sc.mu.RLock()
defer sc.mu.RUnlock()