Skip to content

Commit

Permalink
Add version flag
Browse files Browse the repository at this point in the history
Signed-off-by: zu1k <i@lgf.im>
  • Loading branch information
zu1k committed Dec 17, 2021
1 parent e0973fc commit ba5e887
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

### 从源码安装

Nali 需要预先安装 Go. 安装后可以从源码安装软件:
Nali 需要预先安装 Go >= 1.18. 安装后可以从源码安装软件:

```sh
$ go install github.com/zu1k/nali
Expand Down
5 changes: 4 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"log"
"os"

"github.com/zu1k/nali/internal/constant"

"github.com/spf13/cobra"
"github.com/zu1k/nali/internal/app"
)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ba5e887

Please sign in to comment.