Create a package to store the version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2025-10-26 21:54:00 +07:00
commit ff5ac0fe1f
4 changed files with 35 additions and 9 deletions

View file

@ -29,13 +29,12 @@ import (
"git.happydns.org/happyDeliver/internal/app"
"git.happydns.org/happyDeliver/internal/config"
"git.happydns.org/happyDeliver/internal/version"
)
const version = "0.1.0-dev"
func main() {
fmt.Println("happyDeliver - Email Deliverability Testing Platform")
fmt.Printf("Version: %s\n", version)
fmt.Printf("Version: %s\n", version.Version)
cfg, err := config.ConsolidateConfig()
if err != nil {
@ -54,7 +53,7 @@ func main() {
log.Fatalf("Analyzer error: %v", err)
}
case "version":
fmt.Println(version)
fmt.Println(version.Version)
default:
fmt.Printf("Unknown command: %s\n", command)
printUsage()