Skip to content

Commit 7676ae3

Browse files
committed
upgrade go version
1 parent 27cf5ab commit 7676ae3

6 files changed

Lines changed: 19 additions & 15 deletions

File tree

.github/workflows/go-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-go@v5
1818
with:
19-
go-version: '1.25'
19+
go-version: '1.26'
2020
check-latest: true
2121
- name: golangci-lint
2222
uses: golangci/golangci-lint-action@v8
2323
with:
24-
version: "v2.7.1"
24+
version: "v2.11.3"

.github/workflows/go-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go
1515
uses: actions/setup-go@v5
1616
with:
17-
go-version: '1.25'
17+
go-version: '1.26'
1818
check-latest: true
1919
- name: Run tests
2020
run: go test ./...

cmd/meeseeks/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func writePidFile(pidFile string, pid int) error {
5151
if err := os.MkdirAll(filepath.Dir(pidFile), 0750); err != nil {
5252
return fmt.Errorf("failed to create PID directory: %w", err)
5353
}
54+
//nolint:gosec // writing the pid file is ok
5455
return os.WriteFile(pidFile, []byte(strconv.Itoa(pid)), 0600)
5556
}
5657

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/GustavoCaso/meeseeks
22

3-
go 1.25.0
3+
go 1.26.0
44

55
require (
66
github.com/alecthomas/chroma/v2 v2.23.1

internal/tui/tab/programs.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -388,23 +388,23 @@ func (p *Programs) renderDetails() string {
388388
b.WriteString("\n\n")
389389

390390
// Program details
391-
b.WriteString(fmt.Sprintf(" Name: %s\n", stats.ProgramName))
392-
b.WriteString(fmt.Sprintf(" Status: %s\n", p.statusIndicator(stats.State)))
391+
fmt.Fprintf(&b, " Name: %s\n", stats.ProgramName)
392+
fmt.Fprintf(&b, " Status: %s\n", p.statusIndicator(stats.State))
393393

394394
interval := "none"
395395
if stats.Interval != "" {
396396
interval = stats.Interval
397397
}
398-
b.WriteString(fmt.Sprintf(" Interval: %s\n", interval))
398+
fmt.Fprintf(&b, " Interval: %s\n", interval)
399399
b.WriteString("\n")
400400

401-
b.WriteString(fmt.Sprintf(" Successful: %d\n", stats.Successful))
402-
b.WriteString(fmt.Sprintf(" Failed: %d\n", stats.Failed))
403-
b.WriteString(fmt.Sprintf(" Retries: %d\n", stats.Retries))
404-
b.WriteString(fmt.Sprintf(" Last Run: %s\n", stats.LastRunAt))
401+
fmt.Fprintf(&b, " Successful: %d\n", stats.Successful)
402+
fmt.Fprintf(&b, " Failed: %d\n", stats.Failed)
403+
fmt.Fprintf(&b, " Retries: %d\n", stats.Retries)
404+
fmt.Fprintf(&b, " Last Run: %s\n", stats.LastRunAt)
405405

406406
if stats.NextRunAt != "" {
407-
b.WriteString(fmt.Sprintf(" Next Run: %s\n", stats.NextRunAt))
407+
fmt.Fprintf(&b, " Next Run: %s\n", stats.NextRunAt)
408408
}
409409

410410
return b.String()
@@ -429,7 +429,7 @@ func (p *Programs) logsHeader() string {
429429

430430
// Search bar if in search mode
431431
if p.searchMode {
432-
b.WriteString(fmt.Sprintf("Search: %s█\n\n", p.searchQuery))
432+
fmt.Fprintf(&b, "Search: %s█\n\n", p.searchQuery)
433433
} else if p.searchQuery != "" {
434434
b.WriteString(styles.IdleStyle.Render(fmt.Sprintf("Filter: %s\n\n", p.searchQuery)))
435435
}
@@ -522,7 +522,7 @@ func (p *Programs) startLogStream() tea.Cmd {
522522
if p.cancelFunc != nil {
523523
p.cancelFunc()
524524
}
525-
525+
//nolint:gosec // context cancellation function is called
526526
ctx, cancel := context.WithCancel(context.Background())
527527

528528
p.cancelFunc = cancel

pkg/meeseeks/meeseeks_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,10 @@ func TestMeeseek_Statistic(t *testing.T) {
276276
}
277277
} else {
278278
if statistic.Successful+statistic.Failed != 0 {
279-
t.Errorf("Statistic().Successful + statistic().Failed = %d, want 0 for not started program", statistic.Successful+statistic.Failed)
279+
t.Errorf(
280+
"Statistic().Successful + statistic().Failed = %d, want 0 for not started program",
281+
statistic.Successful+statistic.Failed,
282+
)
280283
}
281284
}
282285
})

0 commit comments

Comments
 (0)