28 lines
458 B
Go
28 lines
458 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"git.sual.in/casual/gobuster-lib/libgobuster"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// nolint:gochecknoglobals
|
|
var cmdVersion *cobra.Command
|
|
|
|
func runVersion(cmd *cobra.Command, args []string) error {
|
|
fmt.Println(libgobuster.VERSION)
|
|
return nil
|
|
}
|
|
|
|
// nolint:gochecknoinits
|
|
func init() {
|
|
cmdVersion = &cobra.Command{
|
|
Use: "version",
|
|
Short: "shows the current version",
|
|
RunE: runVersion,
|
|
}
|
|
|
|
rootCmd.AddCommand(cmdVersion)
|
|
}
|