MCPcopy Create free account
hub / github.com/astercloud/aster / LoadFromFile

Function LoadFromFile

pkg/recipe/recipe.go:173–180  ·  view source on GitHub ↗

LoadFromFile loads a recipe from a YAML file.

(path string)

Source from the content-addressed store, hash-verified

171
172// LoadFromFile loads a recipe from a YAML file.
173func LoadFromFile(path string) (*Recipe, error) {
174 data, err := os.ReadFile(path)
175 if err != nil {
176 return nil, fmt.Errorf("read recipe file: %w", err)
177 }
178
179 return LoadFromBytes(data)
180}
181
182// LoadFromBytes parses a recipe from YAML bytes.
183func LoadFromBytes(data []byte) (*Recipe, error) {

Callers 5

runSessionFunction · 0.92
demonstrateBasicRecipeFunction · 0.92
demonstrateMCPExtensionsFunction · 0.92
demonstrateParametersFunction · 0.92
ListRecipesFunction · 0.85

Calls 2

LoadFromBytesFunction · 0.85
ReadFileMethod · 0.45

Tested by

no test coverage detected