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

Method findLastValue

codersdk/richparameters.go:245–252  ·  view source on GitHub ↗

findLastValue finds the value from the previous build and returns it, or nil if the parameter had no value in the last build.

(p TemplateVersionParameter)

Source from the content-addressed store, hash-verified

243// findLastValue finds the value from the previous build and returns it, or nil if the parameter had no value in the
244// last build.
245func (r *ParameterResolver) findLastValue(p TemplateVersionParameter) *WorkspaceBuildParameter {
246 for _, rp := range r.Rich {
247 if rp.Name == p.Name {
248 return &rp
249 }
250 }
251 return nil
252}

Callers 2

ValidateResolveMethod · 0.95
ResolveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected