Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
GOLANG_VERSION: '1.24.6'
GOLANG_VERSION: '1.26.0'
app: live2text
sysroot: "${{ github.workspace }}/sysroot"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
GOLANG_VERSION: '1.24.6'
GOLANG_VERSION: '1.26.0'

concurrency:
cancel-in-progress: true
Expand All @@ -31,9 +31,9 @@ jobs:
sudo apt-get install -y build-essential portaudio19-dev

- name: Install golangci-lint
uses: golangci/golangci-lint-action@v8
uses: golangci/golangci-lint-action@v9
with:
version: v2.1
version: v2.10.1

- name: Run golangci-lint
run: |
Expand Down
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,11 @@ linters:
# Enable/disable `os.TempDir()` detections.
# Default: false
os-temp-dir: true
gosec:
excludes:
- G115
- G704
- G705

exclusions:
# Log a warning if an exclusion rule is unused.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.24.5-alpine
FROM golang:1.26.0-alpine

ENV CGO_ENABLED=1

Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GO_COVER_TREEMAP := $(BIN_DIR)/go-cover-treemap
LIVE2TEXT_APP := $(PROJECT_DIR)/cmd/live2text/main.go
GOLANGCI_CONFIG := $(PROJECT_DIR)/.golangci.yml

GOLANGCI_LINT_VERSION := v2.1.6
GOLANGCI_LINT_VERSION := v2.10.1
MINIMOCK_VERSION := v3.4.5
GO_COVER_TREEMAP_VERSION := v1.5.0

Expand Down Expand Up @@ -80,12 +80,8 @@ check-portaudio:
fi

.PHONY: show-coverage
show-coverage: $(GO_COVER_TREEMAP)
@# hack that prevents multiple calls of `mktemp` command
@$(MAKE) _show-coverage TMP_DIR=$$(mktemp -d)

.PHONY: _show-coverage
_show-coverage:
show-coverage:
$(eval TMP_DIR := $(shell mktemp -d))
go test -coverprofile $(TMP_DIR)/coverage.out ./...
grep -vE '_(mock|string)\.go' $(TMP_DIR)/coverage.out > $(TMP_DIR)/filtered.out
@echo "Using go-cover-treemap from: $(GO_COVER_TREEMAP)"
Expand Down
9 changes: 5 additions & 4 deletions cmd/live2text/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ func runServe(ctx context.Context, args []string) error {
defer sc.Close()
defer aw.Close()

if err = checkPortAvailable(cfg.AppAddress); err != nil {
if err = checkPortAvailable(ctx, cfg.AppAddress); err != nil {
return fmt.Errorf("app server port check failed: %w", err)
}
if err = checkPortAvailable(cfg.PprofAddress); err != nil {
if err = checkPortAvailable(ctx, cfg.PprofAddress); err != nil {
return fmt.Errorf("pprof server port check failed: %w", err)
}

Expand Down Expand Up @@ -287,8 +287,9 @@ func newBtt(
return btt.NewBtt(hc, ic, lic, dc, lc, vmc, fc, cc)
}

func checkPortAvailable(address string) error {
l, err := net.Listen("tcp", address)
func checkPortAvailable(ctx context.Context, address string) error {
var lc net.ListenConfig
l, err := lc.Listen(ctx, "tcp", address)
if err != nil {
return fmt.Errorf("address %s is occupied: %w", address, err)
}
Expand Down
65 changes: 33 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,53 +1,54 @@
module github.com/roboloop/live2text

go 1.24.6
go 1.26

require (
cloud.google.com/go/speech v1.28.0
github.com/VictoriaMetrics/metrics v1.39.1
github.com/gojuno/minimock/v3 v3.4.5
github.com/gordonklaus/portaudio v0.0.0-20250206071425-98a94950218b
github.com/lmittmann/tint v1.1.2
github.com/stretchr/testify v1.10.0
cloud.google.com/go/speech v1.29.0
github.com/VictoriaMetrics/metrics v1.41.2
github.com/gojuno/minimock/v3 v3.4.7
github.com/gordonklaus/portaudio v0.0.0-20260203164431-765aa7dfa631
github.com/lmittmann/tint v1.1.3
github.com/stretchr/testify v1.11.1
github.com/youpy/go-wav v0.3.2
golang.org/x/sync v0.16.0
golang.org/x/term v0.34.0
google.golang.org/grpc v1.74.2
google.golang.org/protobuf v1.36.7
golang.org/x/sync v0.19.0
golang.org/x/term v0.40.0
google.golang.org/grpc v1.79.1
google.golang.org/protobuf v1.36.11
)

require (
cloud.google.com/go v0.121.4 // indirect
cloud.google.com/go/auth v0.16.4 // indirect
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.18.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.8.0 // indirect
cloud.google.com/go/longrunning v0.6.7 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
cloud.google.com/go/longrunning v0.8.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.12 // indirect
github.com/googleapis/gax-go/v2 v2.17.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
github.com/youpy/go-riff v0.1.0 // indirect
github.com/zaf/g711 v1.4.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/time v0.12.0 // indirect
google.golang.org/api v0.246.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect
go.opentelemetry.io/otel v1.40.0 // indirect
go.opentelemetry.io/otel/metric v1.40.0 // indirect
go.opentelemetry.io/otel/trace v1.40.0 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/net v0.50.0 // indirect
golang.org/x/oauth2 v0.35.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/text v0.34.0 // indirect
golang.org/x/time v0.14.0 // indirect
google.golang.org/api v0.268.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260223185530-2f722ef697dc // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260223185530-2f722ef697dc // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading