1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 21:29:02 +08:00

Add version flag

Signed-off-by: zu1k <i@lgf.im>
This commit is contained in:
zu1k 2021-12-17 13:24:03 +08:00
parent 184fdd3005
commit c8b3130e1a
2 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,7 @@
### 从源码安装
Nali 需要预先安装 Go. 安装后可以从源码安装软件:
Nali 需要预先安装 Go >= 1.18. 安装后可以从源码安装软件:
```sh
$ go install github.com/zu1k/nali

View File

@ -4,6 +4,8 @@ import (
"log"
"os"
"github.com/zu1k/nali/internal/constant"
"github.com/spf13/cobra"
"github.com/zu1k/nali/internal/app"
)
@ -50,6 +52,7 @@ Find document on: https://github.com/zu1k/nali
$ nslookup google.com | nali
`,
Version: constant.Version,
Args: cobra.MinimumNArgs(0),
Run: func(cmd *cobra.Command, args []string) {
gbk, _ := cmd.Flags().GetBool("gbk")