MCPcopy Create free account
hub / github.com/github/gh-aw / extractCompilerVersionFromLockContent

Function extractCompilerVersionFromLockContent

pkg/cli/upgrade_org.go:184–190  ·  view source on GitHub ↗

extractCompilerVersionFromLockContent parses the gh-aw-metadata JSON comment from a lock file and returns the compiler_version field value. Returns empty string if not found or on parse error.

(content string)

Source from the content-addressed store, hash-verified

182// from a lock file and returns the compiler_version field value.
183// Returns empty string if not found or on parse error.
184func extractCompilerVersionFromLockContent(content string) string {
185 meta, _, err := workflow.ExtractMetadataFromLockFile(content)
186 if err != nil || meta == nil {
187 return ""
188 }
189 return meta.CompilerVersion
190}
191
192// formatCurrentVersionSuffix formats a version string for inline display,
193// e.g. ", compiler: v1.2.3". Returns an empty string when version is empty.

Calls 1

Tested by

no test coverage detected