-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
描述问题 · Describe the bug
After modifying the code and running it with -toolexec decorator, the error "cannot use _ as value or type" appears
期望 · Expected behavior
Normal operation
环境 (选其一) · Env (please complete the following information):
- OS: Linux
- Go: 1.23
- go-decorator: 0.21.0
最小化可复现代码 · Minimize reproducible code
在这里贴代码或者提供代码仓库地址 · There is a code here or a link to code (), ref.
import (
_ "github.com/dengsgo/go-decorator/decor"
_ "leeks/user/internal/aop"
)
//go:decor aop.Get
func (l *GetLoginNonceLogic) GetLoginNonce(_ *pb.Empty) (*pb.LoginNonceResp, error) {
randomString := xutils.GenerateRandomString(64)
if err := l.svcCtx.Redis.Set(l.ctx, randomString, 0x1, 10*time.Minute).Err(); err != nil {
return nil, status.Error(xcode.CommonError, err.Error())
}
return &pb.LoginNonceResp{
Nonce: randomString,
}, nil
}
编译执行的命令 · Build command
提供报错所执行的命令 · Commands executed by the compiled code。
go run -toolexec decorator service.go
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working