MCPcopy Create free account
hub / github.com/apache/devlake / hashScript

Function hashScript

backend/helpers/migrationhelper/migrationhelper.go:374–381  ·  view source on GitHub ↗
(script plugin.MigrationScript)

Source from the content-addressed store, hash-verified

372}
373
374func hashScript(script plugin.MigrationScript) string {
375 hasher := md5.New()
376 _, err := hasher.Write([]byte(fmt.Sprintf("%s:%v", script.Name(), script.Version())))
377 if err != nil {
378 panic(err)
379 }
380 return strings.ToUpper(hex.EncodeToString(hasher.Sum(nil)))
381}

Callers 2

ChangeColumnsTypeFunction · 0.85
TransformTableFunction · 0.85

Calls 4

NewMethod · 0.65
NameMethod · 0.65
VersionMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected