feat: add new interface method to firewals
All checks were successful
build / build (push) Successful in 3m9s
All checks were successful
build / build (push) Successful in 3m9s
This commit is contained in:
17
cmd/banforge/command/version.go
Normal file
17
cmd/banforge/command/version.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var version = "0.4.3"
|
||||
|
||||
var VersionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "BanForge version",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("BanForge version:", version)
|
||||
},
|
||||
}
|
||||
@@ -13,7 +13,6 @@ var rootCmd = &cobra.Command{
|
||||
Use: "banforge",
|
||||
Short: "IPS log-based written on Golang",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -28,6 +27,7 @@ func Execute() {
|
||||
rootCmd.AddCommand(command.BanCmd)
|
||||
rootCmd.AddCommand(command.UnbanCmd)
|
||||
rootCmd.AddCommand(command.BanListCmd)
|
||||
rootCmd.AddCommand(command.VersionCmd)
|
||||
command.RuleRegister()
|
||||
command.FwRegister()
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user