mirror of
https://github.com/zu1k/nali.git
synced 2025-01-22 13:19:02 +08:00
Add version flag
Signed-off-by: zu1k <i@lgf.im>
This commit is contained in:
parent
184fdd3005
commit
c8b3130e1a
@ -44,7 +44,7 @@
|
||||
|
||||
### 从源码安装
|
||||
|
||||
Nali 需要预先安装 Go. 安装后可以从源码安装软件:
|
||||
Nali 需要预先安装 Go >= 1.18. 安装后可以从源码安装软件:
|
||||
|
||||
```sh
|
||||
$ go install github.com/zu1k/nali
|
||||
|
@ -4,6 +4,8 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/zu1k/nali/internal/constant"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/zu1k/nali/internal/app"
|
||||
)
|
||||
@ -50,7 +52,8 @@ Find document on: https://github.com/zu1k/nali
|
||||
|
||||
$ nslookup google.com | nali
|
||||
`,
|
||||
Args: cobra.MinimumNArgs(0),
|
||||
Version: constant.Version,
|
||||
Args: cobra.MinimumNArgs(0),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
gbk, _ := cmd.Flags().GetBool("gbk")
|
||||
app.Root(args, gbk)
|
||||
|
Loading…
Reference in New Issue
Block a user