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

Method extractSource

pkg/workflow/frontmatter_extraction_metadata.go:59–71  ·  view source on GitHub ↗

extractSource extracts the source field from frontmatter

(frontmatter map[string]any)

Source from the content-addressed store, hash-verified

57
58// extractSource extracts the source field from frontmatter
59func (c *Compiler) extractSource(frontmatter map[string]any) string {
60 value, exists := frontmatter["source"]
61 if !exists {
62 return ""
63 }
64
65 // Convert the value to string
66 if strValue, ok := value.(string); ok {
67 return strings.TrimSpace(strValue)
68 }
69
70 return ""
71}
72
73// extractRedirect extracts the redirect field from frontmatter
74func (c *Compiler) extractRedirect(frontmatter map[string]any) string {

Callers 2

Calls

no outgoing calls

Tested by 1