We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
误用参数-h报错信息
[~]$ ./go-mud -h 123.57.24.152 GoMud(version v0.6.1-RC1) Usage: ./go-mud [flags] Flags: -c, --config FILENAME config FILENAME, default to `config.yaml` or `config.json` --version just print version number only --help show this message --gen-yaml generate config.yaml --gen-json generate config.json --ui.ambiguouswidth string 二义性字符宽度,可选值: auto/single/double/space (default "auto") --ui.historylines int 历史记录保留行数 (default 100000) --ui.rttvheight int 历史查看模式下实时文本区域高度 (default 10) -H, --mud.host IP/Domain 服务器 IP/Domain (default "mud.pkuxkx.net") -P, --mud.port Port 服务器 Port (default 8080) --lua.enable 是否加载 Lua 机器人 (default true) -p, --lua.path path Lua 插件路径 path (default "lua") panic: runtime error: index out of range [-1] goroutine 22 [running]: github.com/dzpao/go-mud/ui.(*UI).Print(0x4000190580, 0x4000093e18, 0x1, 0x1, 0x0, 0x0, 0x0) github.com/dzpao/go-mud@/ui/ui.go:342 +0x46c github.com/dzpao/go-mud/ui.(*UI).Println(0x4000190580, 0x400021da60, 0x1, 0x1, 0xee6b2800, 0x0, 0x0) github.com/dzpao/go-mud@/ui/ui.go:364 +0x84 github.com/dzpao/go-mud/mud.(*MudServer).Run(0x40001f8480) github.com/dzpao/go-mud@/mud/mud.go:67 +0x95c created by main.(*Client).Run github.com/dzpao/go-mud@/main.go:67 +0x238
The text was updated successfully, but these errors were encountered:
了解了。我会尽快解决。
BTW:发文时可以用 markdown 语法。这样排版好看一点。
Sorry, something went wrong.
Fix: 增加捕获短选项 -h
e0fcb09
反正这个选项已经被 spf13/pflag 给捕获了,如果这里不处理的话,反而会导致 BUG: https://github.com/dzpao/go-mud/issues/24 应该是由于这里造成的: https://github.com/spf13/pflag/blob/2e9d26c8c3/flag.go#L1020-L1023 https://github.com/spf13/cobra/blob/89c7ffb5/command.go#L923-L926 所以在这里也捕获一下,否则 -h 时 LoadConfig 不会退出程序。
9a64742
反正这个选项已经被 spf13/pflag 给捕获了,如果这里不处理的话,反而会导致 BUG: https://github.com/dzpao/go-mud/issues/24 应该是由于这里造成的: https://github.com/spf13/pflag/blob/2e9d26c8c3/flag.go#L1020-L1023 https://github.com/spf13/cobra/blob/89c7ffb5/command.go#L923-L926 所以在这里也捕获一下,否则 -h 时 LoadConfig 不会退出程序。 本次修改应当可以 Close #2
Fix: #24 命令行选项 -h 会导致程序异常
daf2c36
应该属于 flw-cn/go-smartConfig 的问题,升级该模块至 v1.0.0 后解决。
Merge pull request #26 from mudclient/feat/v0.6.1
6241923
v0.6.1 开发完成,应当可以 Close #21 #24
Successfully merging a pull request may close this issue.
误用参数-h报错信息
The text was updated successfully, but these errors were encountered: