feat: 添加自动发现功能及相关配置

This commit is contained in:
Akizon77
2025-08-09 04:50:59 +00:00
parent 655a60ec98
commit 10f2548868
5 changed files with 200 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ func CheckAndUpdate() error {
// Determine if update is needed
if latest.Version.Equals(currentSemVer) {
fmt.Println("Current version is the latest:", CurrentVersion)
log.Println("Current version is the latest:", CurrentVersion)
return nil
}
// Default is installed as a service, so don't automatically restart
@@ -75,7 +75,7 @@ func CheckAndUpdate() error {
// if err != nil {
// return fmt.Errorf("failed to restart program: %v", err)
// }
fmt.Printf("Successfully updated to version %s\n", latest.Version)
log.Printf("Successfully updated to version %s\n", latest.Version)
os.Exit(42)
return nil
}