Files
gitleaks/cmd/version.go
T
Zachary Rice 3821f30b06 Config min version (#1955)
* init

* minVersion set

* sigh

* addressed some comments, fixed double validate bug
2025-10-16 13:53:00 -05:00

23 lines
350 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
"github.com/zricethezav/gitleaks/v8/version"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "display gitleaks version",
Run: runVersion,
}
func runVersion(cmd *cobra.Command, args []string) {
fmt.Println(version.Version)
}