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

Function find

buildinfo/buildinfo.go:157–171  ·  view source on GitHub ↗

find panics if a setting with the specific key was not found in the build info.

(key string)

Source from the content-addressed store, hash-verified

155// find panics if a setting with the specific key was not
156// found in the build info.
157func find(key string) (string, bool) {
158 readBuildInfo.Do(func() {
159 buildInfo, buildInfoValid = debug.ReadBuildInfo()
160 })
161 if !buildInfoValid {
162 panic("couldn't read build info")
163 }
164 for _, setting := range buildInfo.Settings {
165 if setting.Key != key {
166 continue
167 }
168 return setting.Value, true
169 }
170 return "", false
171}

Callers 2

TimeFunction · 0.85
RevisionFunction · 0.85

Calls 1

DoMethod · 0.65

Tested by

no test coverage detected