代码拉取完成,页面将自动刷新
From a6b0c93a80bfdfb51d92d2da0b61c520832add5c Mon Sep 17 00:00:00 2001
From: Longjun Luo <luolongjuna@gmail.com>
Date: Fri, 6 Jan 2023 11:16:37 +0800
Subject: [PATCH] nvwa: let nvwa to parse help/h and remove version print
Signed-off-by: Longjun Luo <luolongjuna@gmail.com>
---
src/client.go | 1 -
src/main.go | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/client.go b/src/client.go
index 70d5832..1f0c485 100644
--- a/src/client.go
+++ b/src/client.go
@@ -43,7 +43,6 @@ func startClient(path string) {
app := &cli.App{
Name: "nvwa",
Usage: "a tool used for openEuler kernel update.",
- Version: "0.1",
Compiled: time.Now(),
Commands: []*cli.Command{
{
diff --git a/src/main.go b/src/main.go
index bcb5bb4..27811ed 100644
--- a/src/main.go
+++ b/src/main.go
@@ -9,6 +9,8 @@ var socketPath = "/run/nvwa/nvwa.socket"
func main() {
server := flag.Int("server", 0,
"set this value to 1 to start a server")
+ _ = flag.Bool("h", false, "use nvwa help to see help text")
+ _ = flag.Bool("help", false, "use nvwa help to see help text")
flag.Parse()
if *server != 0 {
startServer(socketPath)
--
2.38.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。