11 Star 3 Fork 13

src-openEuler/nvwa

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-nvwa-let-nvwa-to-parse-help-h-and-remove-version-pri.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
Anatas 提交于 2023-01-03 20:55 . systemd: solve exist problems for systemd
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/nvwa.git
git@gitee.com:src-openeuler/nvwa.git
src-openeuler
nvwa
nvwa
master

搜索帮助