Time returns when the Git revision was published.
()
| 136 | |
| 137 | // Time returns when the Git revision was published. |
| 138 | func Time() (time.Time, bool) { |
| 139 | value, valid := find("vcs.time") |
| 140 | if !valid { |
| 141 | return time.Time{}, false |
| 142 | } |
| 143 | parsed, err := time.Parse(time.RFC3339, value) |
| 144 | if err != nil { |
| 145 | panic("couldn't parse time: " + err.Error()) |
| 146 | } |
| 147 | return parsed, true |
| 148 | } |
| 149 | |
| 150 | // Revision returns the full Git hash of the build. |
| 151 | func Revision() (string, bool) { |