Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception recovered: runtime error: index out of range [1] with length 0 #3

Closed
lifetin opened this issue Jul 8, 2023 · 2 comments
Closed

Comments

@lifetin
Copy link

lifetin commented Jul 8, 2023

make run执行报这错误,咋整呀.后面的全部跑不起来

make run

******** gf gen dao ********
generated: internal/dao/demo.go
generated: internal/dao/internal/demo.go
generated: internal/model/do/demo.go
generated: internal/model/entity/demo.go
done!
******** gf gen service ********
not dirty, ignore generating service go file: internal/service/demo.go
not dirty, ignore generating service go file: internal/service/middleware.go
exception recovered: runtime error: index out of range [1] with length 0

  1. exception recovered: runtime error: index out of range [1] with length 0
    1). github.com/gogf/gf/v2/os/gcmd.(*Command).doRun.func1
    /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:111
    2). runtime.gopanic
    /opt/hostedtoolcache/go/1.20.4/x64/src/runtime/panic.go:884
    3). go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.func1
    /home/runner/go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.7.0/trace/span.go:359
    4). go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End
    /home/runner/go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.7.0/trace/span.go:398
    5). runtime.goPanicIndex
    /opt/hostedtoolcache/go/1.20.4/x64/src/runtime/panic.go:113
    6). github.com/gogf/gf/cmd/gf/v2/internal/cmd/genservice.CGenService.checkAndUpdateMain
    /home/runner/work/gf/gf/cmd/gf/internal/cmd/genservice/genservice.go:327
    7). github.com/gogf/gf/cmd/gf/v2/internal/cmd/genservice.CGenService.Service
    /home/runner/work/gf/gf/cmd/gf/internal/cmd/genservice/genservice.go:303
    8). reflect.Value.call
    /opt/hostedtoolcache/go/1.20.4/x64/src/reflect/value.go:586
    9). reflect.Value.Call
    /opt/hostedtoolcache/go/1.20.4/x64/src/reflect/value.go:370
    10). github.com/gogf/gf/v2/os/gcmd.newCommandFromMethod.func1
    /home/runner/work/gf/gf/os/gcmd/gcmd_command_object.go:324
    11). github.com/gogf/gf/v2/os/gcmd.(*Command).doRun
    /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:152
    12). github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithValueError
    /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:91
    13). github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithError
    /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:69
    14). github.com/gogf/gf/cmd/gf/v2/gfcmd.(*Command).Run
    /home/runner/work/gf/gf/cmd/gf/gfcmd/gfcmd.go:62
    15). main.main
    /home/runner/work/gf/gf/cmd/gf/main.go:27
    16). runtime.main
    /opt/hostedtoolcache/go/1.20.4/x64/src/runtime/proc.go:250
    17). runtime.goexit
    /opt/hostedtoolcache/go/1.20.4/x64/src/runtime/asm_amd64.s:1598

make: *** [service] 错误 1
[root@MiWiFi-R4CM-srv gf2-demo]# A

@windvalley
Copy link
Owner

@lifetin gf命令行工具新版本导致的问题, gf官方已经在下一个版本v2.5.0修复了这个问题, 请等待官方发布新版;
着急使用的话, 可暂时将你本地的gf命令行工具降到2.4.0版本.

@lifetin
Copy link
Author

lifetin commented Jul 9, 2023

@lifetin gf命令行工具新版本导致的问题, gf官方已经在下一个版本v2.5.0修复了这个问题, 请等待官方发布新版; 着急使用的话, 可暂时将你本地的gf命令行工具降到2.4.0版本.

收到

@lifetin lifetin closed this as completed Jul 9, 2023
windvalley added a commit that referenced this issue Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants