📝 docs: add comprehensive version management and CLI documentation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Package main provides the DanceLessonsCoach server entry point
|
||||
//
|
||||
// @title DanceLessonsCoach API
|
||||
// @version 1.0
|
||||
// @version 1.1.1
|
||||
// @description API for DanceLessonsCoach service providing greeting functionality
|
||||
// @termsOfService http://swagger.io/terms/
|
||||
|
||||
@@ -20,14 +20,23 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"DanceLessonsCoach/pkg/config"
|
||||
"DanceLessonsCoach/pkg/server"
|
||||
"DanceLessonsCoach/pkg/version"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Check for version flag first (before config loading)
|
||||
if len(os.Args) > 1 && (os.Args[1] == "--version" || os.Args[1] == "-version") {
|
||||
fmt.Println(version.Full())
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// Load configuration (this will also setup logging)
|
||||
cfg, err := config.LoadConfig()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user