Skip to content

Commit 28be79a

Browse files
committed
lint: core/async Callback as type alias
1 parent 5f5aa61 commit 28be79a

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

intra/core/async.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func ActiveWorkers() []WorkersState {
2727
}
2828

2929
// Go runs f in a goroutine and recovers from any panics.
30-
func Go(who string, f Callback) {
30+
func Go(who string, f Finally) {
3131
go func() {
3232
debug.SetPanicOnFault(true)
3333
defer Recover(DontExit, who)

intra/core/barrier.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ var (
3939
)
4040

4141
// Work is the type of the function to memoize.
42-
type Callback func()
4342
type Work[T any] func() (T, error)
4443
type Work1[T any] func(T) (T, error)
4544
type WorkCtx[T any] func(context.Context) (T, error)

intra/core/dontpanic.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222

2323
type Finally func()
2424

25+
type Callback = Finally
26+
2527
type ExitCode int
2628

2729
func (e ExitCode) int() int {

0 commit comments

Comments
 (0)