You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use build timestamp to distinguish different version of application binary is a common way in other languages.
eg: C has macros "__DATE__" and "__TIME__" to fetch compiler time.
But golang has no way to achive this feature nowadays.
I have made a patch to provide fllow API to achive it.
This issue has been reject by offical
see golang#23175
So I provide my own go master branch to support some useful issues that official repository do not support
vipally
changed the title
proposal: runtime, time: add API BuildTimestamp to report an application's build time
runtime, time: add API BuildTimestamp to report an application's build time
Dec 22, 2017
refer golang#23175
Use build timestamp to distinguish different version of application binary is a common way in other languages.
eg: C has macros "__DATE__" and "__TIME__" to fetch compiler time.
But golang has no way to achive this feature nowadays.
I have made a patch to provide fllow API to achive it.
runtime.BuildTimestamp defines a buildtimestamp value which will be written by linker(cmd/link).
time.BuildTime() converts runtime.BuildTimestamp() to time.Time.
The expected usage of BuildTimestamp API is as follow:
It will be my pleasure that if go team can accept this feature in go repository.
The branch
The text was updated successfully, but these errors were encountered: