MCPcopy Create free account
hub / github.com/bracesdev/errtrace / versionCacheKey

Method versionCacheKey

cmd/errtrace/toolexec.go:89–98  ·  view source on GitHub ↗

Options affect the generated code, so use a hash of any options for the toolexec version.

()

Source from the content-addressed store, hash-verified

87// Options affect the generated code, so use a hash
88// of any options for the toolexec version.
89func (p *toolExecParams) versionCacheKey() string {
90 withoutTool := *p
91 withoutTool.flags = nil
92 withoutTool.Tool = ""
93 withoutTool.ToolArgs = nil
94
95 optStr := fmt.Sprintf("%v", withoutTool)
96 optHash := md5.Sum([]byte(optStr))
97 return hex.EncodeToString(optHash[:])
98}
99
100func (p *toolExecParams) requiredPackage(pkg string) bool {
101 for _, selector := range p.RequiredPkgSelectors {

Callers 1

toolExecVersionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected