1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 21:29:02 +08:00
nali/cmd/parse.go
2020-07-17 09:05:25 +08:00

33 lines
805 B
Go

package cmd
import (
"github.com/zu1k/nali/internal/app"
"github.com/spf13/cobra"
)
// parseCmd represents the parse command
var parseCmd = &cobra.Command{
Use: "parse",
Short: "Query IP information",
Long: `Query IP information.`,
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
app.ParseIPs(args)
},
}
func init() {
rootCmd.AddCommand(parseCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// parseCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// parseCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}