Skip to content

Commit 404cd06

Browse files
committed
build(项目): 修复编译错误
1 parent 717fff1 commit 404cd06

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

internal/argument/action.go

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package argument
2+
3+
import (
4+
"github.com/pangum/pangu/internal/runtime"
5+
)
6+
7+
type Action[T Type] func(ctx *runtime.Context, value T) error

internal/argument/builder.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package argument
22

3-
import (
4-
"github.com/pangum/pangu/internal/argument/internal"
5-
)
6-
73
var _ = New[int]
84

95
type Builder[T Type] struct {
@@ -76,7 +72,7 @@ func (b *Builder[T]) Text(text string) (builder *Builder[T]) {
7672
return
7773
}
7874

79-
func (b *Builder[T]) Action(action internal.Action[T]) (builder *Builder[T]) {
75+
func (b *Builder[T]) Action(action Action[T]) (builder *Builder[T]) {
8076
b.argument.action = action
8177
builder = b
8278

internal/argument/default.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55

66
"github.com/goexl/gox"
77
"github.com/pangum/pangu/internal/app"
8-
"github.com/pangum/pangu/internal/argument/internal"
98
"github.com/pangum/pangu/internal/runtime"
109
"github.com/urfave/cli/v2"
1110
)
@@ -34,7 +33,7 @@ type Default[T Type] struct {
3433
// 默认显示字符串
3534
text string
3635
// 动作
37-
action internal.Action[T]
36+
action Action[T]
3837

3938
_ gox.CannotCopy
4039
}

internal/argument/internal/action.go

-8
This file was deleted.

0 commit comments

Comments
 (0)