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

