feat: migrate to golang

This commit is contained in:
2026-07-19 20:01:38 +08:00
parent 302d4e6bb5
commit a2630df9e0
69 changed files with 4750 additions and 3369 deletions

View File

@ -0,0 +1,18 @@
//go:build darwin
package subscription
import (
"os"
"syscall"
"time"
)
// creationTime returns the file's birth time on macOS, matching Python's
// stat.st_birthtime (subscription_manager.py:273-275).
func creationTime(info os.FileInfo) time.Time {
if stat, ok := info.Sys().(*syscall.Stat_t); ok {
return time.Unix(stat.Birthtimespec.Sec, stat.Birthtimespec.Nsec)
}
return info.ModTime()
}