mirror of
https://github.com/OJ/gobuster.git
synced 2025-01-05 16:24:10 +01:00
28 lines
452 B
Go
28 lines
452 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/OJ/gobuster/v3/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)
|
|
}
|