2020-07-17 12:12:04 +08:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2022-03-02 12:43:41 +08:00
|
|
|
"github.com/zu1k/nali/internal/db"
|
2020-07-17 12:12:04 +08:00
|
|
|
|
2021-08-03 07:54:35 +08:00
|
|
|
"github.com/spf13/cobra"
|
2020-07-17 12:12:04 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// updateCmd represents the update command
|
|
|
|
var updateCmd = &cobra.Command{
|
|
|
|
Use: "update",
|
|
|
|
Short: "update chunzhen ip database",
|
|
|
|
Long: `update chunzhen ip database`,
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2022-03-02 12:43:41 +08:00
|
|
|
db.UpdateAllDB()
|
2020-07-17 12:12:04 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(updateCmd)
|
|
|
|
}
|