SyntaxFix
Write A Post
Hire A Developer
Questions
I would "inject" the starttime variable instead, otherwise you have a circular dependency between the packages.
main.go
var StartTime = time.Now() func main() { otherPackage.StartTime = StartTime }
otherpackage.go
var StartTime time.Time