renommage lassistanoque

This commit is contained in:
2026-08-07 00:03:15 +02:00
commit 5810c4c94f
73 changed files with 2601 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(
newVersionCmd(),
)
}
// Version, CommitSHA, and BuildDate are set at build time using ldflags.
var (
Version = "dev"
CommitSHA = "none"
BuildDate = "unknown"
)
// newVersionCmd creates the version command for displaying version information.
func newVersionCmd() *cobra.Command {
var short bool
cmd := &cobra.Command{
Use: "version",
Short: "Show version",
Long: "Display version information for the agence application.",
Run: func(cmd *cobra.Command, args []string) {
if short {
fmt.Println(Version)
return
}
fmt.Printf("lassistanoque %s (commit: %s, built: %s)\n", Version, CommitSHA, BuildDate)
},
}
cmd.Flags().BoolVarP(&short, "short", "s", false, "show only version number")
return cmd
}