- commit
- ca23e6d
- parent
- bd6d79c
- author
- Antonio Mika
- date
- 2025-02-12 21:51:24 -0500 EST
Update go version and add buffer to scanner with pipe
10 files changed,
+10,
-5
+1,
-1
1@@ -8,7 +8,7 @@ runs:
2 - name: Set up Go
3 uses: actions/setup-go@v3
4 with:
5- go-version: 1.23
6+ go-version: 1.24
7 - name: Lint the codebase
8 uses: golangci/golangci-lint-action@v3
9 with:
+1,
-1
1@@ -1,4 +1,4 @@
2-FROM --platform=$BUILDPLATFORM golang:1.23 AS builder-deps
3+FROM --platform=$BUILDPLATFORM golang:1.24 AS builder-deps
4 LABEL maintainer="Pico Maintainers <hello@pico.sh>"
5
6 WORKDIR /app
M
Makefile
+1,
-1
1@@ -83,7 +83,7 @@ build: build-prose build-pastes build-feeds build-pgs build-auth build-pico buil
2
3 scripts:
4 # might need to set MINIO_URL
5- docker run --rm -it --env-file .env -v $(shell pwd):/app -w /app golang:1.23 /bin/bash
6+ docker run --rm -it --env-file .env -v $(shell pwd):/app -w /app golang:1.24 /bin/bash
7 .PHONY: scripts
8
9 fmt:
+1,
-0
1@@ -692,6 +692,7 @@ func metricDrainSub(ctx context.Context, dbpool db.DB, logger *slog.Logger, secr
2
3 for {
4 scanner := bufio.NewScanner(drain)
5+ scanner.Buffer(make([]byte, 32*1024), 32*1024)
6 for scanner.Scan() {
7 line := scanner.Text()
8 clean := strings.TrimSpace(line)
+1,
-1
1@@ -1,4 +1,4 @@
2-FROM --platform=$BUILDPLATFORM golang:1.23 AS builder-deps
3+FROM --platform=$BUILDPLATFORM golang:1.24 AS builder-deps
4 LABEL maintainer="Pico Maintainers <hello@pico.sh>"
5
6 WORKDIR /app
M
dev.md
+1,
-1
1@@ -1,6 +1,6 @@
2 ## development
3
4-- `golang` >= 1.23.1
5+- `golang` >= 1.24
6 - `direnv` to load environment vars
7
8 ```bash
+1,
-0
1@@ -263,6 +263,7 @@ func (web *WebRouter) cacheMgmt(ctx context.Context, httpCache *middleware.Souin
2
3 for {
4 scanner := bufio.NewScanner(drain)
5+ scanner.Buffer(make([]byte, 32*1024), 32*1024)
6 for scanner.Scan() {
7 surrogateKey := strings.TrimSpace(scanner.Text())
8 web.Cfg.Logger.Info("received cache-drain item", "surrogateKey", surrogateKey)
+1,
-0
1@@ -78,6 +78,7 @@ func (c *Cmd) logs(ctx context.Context) error {
2 }
3
4 scanner := bufio.NewScanner(stdoutPipe)
5+ scanner.Buffer(make([]byte, 32*1024), 32*1024)
6 for scanner.Scan() {
7 line := scanner.Text()
8 parsedData := map[string]any{}
+1,
-0
1@@ -199,6 +199,7 @@ func handlePub(pubsub bool) http.HandlerFunc {
2 defer wg.Done()
3
4 s := bufio.NewScanner(p)
5+ s.Buffer(make([]byte, 32*1024), 32*1024)
6
7 for s.Scan() {
8 if s.Text() == "sending msg ..." {
+1,
-0
1@@ -178,6 +178,7 @@ func (m Model) connectLogs(sub chan map[string]any) tea.Cmd {
2 }
3
4 scanner := bufio.NewScanner(drain)
5+ scanner.Buffer(make([]byte, 32*1024), 32*1024)
6 for scanner.Scan() {
7 line := scanner.Text()
8 parsedData := map[string]any{}