MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / ValidatePath

Function ValidatePath

lib/blobtypes/migrator.go:227–232  ·  view source on GitHub ↗

ValidatePath checks if a valid migration chain exists between Start and End types.

(m *Migrator)

Source from the content-addressed store, hash-verified

225
226// ValidatePath checks if a valid migration chain exists between Start and End types.
227func ValidatePath[Start Payload, End Payload](m *Migrator) error {
228 var start Start
229 var end End
230
231 return m.validatePathInternal(start.Kind(), start.Version(), end.Kind(), end.Version())
232}
233
234func (m *Migrator) validatePathInternal(startKind, startVersion, endKind, endVersion string) error {
235 currKey := makeKey(startKind, startVersion)

Callers

nothing calls this directly

Calls 3

validatePathInternalMethod · 0.80
KindMethod · 0.65
VersionMethod · 0.65

Tested by

no test coverage detected