some modernization, remove debug prints, pin go 1.25

This commit is contained in:
Daisuke Maki 2026-02-18 09:47:25 +09:00
parent ced740f32d
commit 6a89f1e352
5 changed files with 8 additions and 19 deletions

View file

@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.25', '1.24' ]
go: [ '1.25' ]
name: Go ${{ matrix.go }} test
steps:
- name: Checkout repository

View file

@ -510,11 +510,9 @@ func (f *Filter) Loop(ctx context.Context, cancel func()) error {
f.state.Hub().SendStatusMsg(ctx, "Running query...", 0)
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
f.Work(workctx, q)
}()
})
}
}
}

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/peco/peco
go 1.24.0
go 1.25.0
require (
github.com/gdamore/tcell/v2 v2.13.8

View file

@ -928,18 +928,14 @@ func TestCancelFuncDataRace(t *testing.T) {
// p.err would be flagged.
var wg sync.WaitGroup
for range 10 {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
_ = p.Err()
}()
})
}
for i := range 5 {
wg.Add(1)
go func(i int) {
defer wg.Done()
wg.Go(func() {
p.Exit(fmt.Errorf("exit-%d", i))
}(i)
})
}
wg.Wait()

View file

@ -2,7 +2,6 @@ package pipeline
import (
"bufio"
"fmt"
"io"
"regexp"
"strings"
@ -25,7 +24,6 @@ func NewRegexpFilter(rx *regexp.Regexp) *RegexpFilter {
}
func (rf *RegexpFilter) Accept(ctx context.Context, in <-chan line.Line, out ChanOutput) {
defer fmt.Println("END RegexpFilter.Accept")
defer close(out)
for {
select {
@ -63,8 +61,6 @@ func (f *LineFeeder) Reset() {
}
func (f *LineFeeder) Start(ctx context.Context, out ChanOutput) {
fmt.Println("START LineFeeder.Start")
defer fmt.Println("END LineFeeder.Start")
defer close(out)
for _, l := range f.lines {
out.Send(ctx, l)
@ -92,7 +88,6 @@ func (r *Receiver) Done() <-chan struct{} {
}
func (r *Receiver) Accept(ctx context.Context, in <-chan line.Line, _ ChanOutput) {
defer fmt.Println("END Receiver.Accept")
defer close(r.done)
for {