MCPcopy Index your code
hub / github.com/coder/coder / Time

Function Time

buildinfo/buildinfo.go:138–148  ·  view source on GitHub ↗

Time returns when the Git revision was published.

()

Source from the content-addressed store, hash-verified

136
137// Time returns when the Git revision was published.
138func 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.
151func Revision() (string, bool) {

Callers 2

TestBuildInfoFunction · 0.92
defaultVersionInfoFunction · 0.92

Calls 3

findFunction · 0.85
ParseMethod · 0.65
ErrorMethod · 0.45

Tested by 1

TestBuildInfoFunction · 0.74