📝 docs: add comprehensive version management and CLI documentation
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"DanceLessonsCoach/pkg/version"
|
||||
)
|
||||
|
||||
// Config represents the application configuration
|
||||
@@ -52,6 +54,21 @@ type APIConfig struct {
|
||||
V2Enabled bool `mapstructure:"v2_enabled"`
|
||||
}
|
||||
|
||||
// VersionInfo holds application version information
|
||||
type VersionInfo struct {
|
||||
Version string `mapstructure:"-"` // Set via ldflags
|
||||
Commit string `mapstructure:"-"` // Set via ldflags
|
||||
Date string `mapstructure:"-"` // Set via ldflags
|
||||
GoVersion string `mapstructure:"-"` // Set at runtime
|
||||
}
|
||||
|
||||
// VersionCommand handles version display
|
||||
func (c *Config) VersionCommand() string {
|
||||
// This will be enhanced when we integrate with cobra
|
||||
return fmt.Sprintf("DanceLessonsCoach %s (commit: %s, built: %s, go: %s)",
|
||||
version.Version, version.Commit, version.Date, version.GoVersion)
|
||||
}
|
||||
|
||||
// SamplerConfig holds tracing sampler configuration
|
||||
type SamplerConfig struct {
|
||||
Type string `mapstructure:"type"`
|
||||
|
||||
Reference in New Issue
Block a user