LoadStack loads a stack from the specified path.
(name string)
| 40 | |
| 41 | // LoadStack loads a stack from the specified path. |
| 42 | func LoadStack(name string) (*Stack, error) { |
| 43 | usrStackFile := SelectYamlFile(apx.Cnf.UserStacksPath, name) |
| 44 | stack, err := LoadStackFromPath(usrStackFile) |
| 45 | if err != nil { |
| 46 | stackFile := SelectYamlFile(apx.Cnf.StacksPath, name) |
| 47 | stack, err = LoadStackFromPath(stackFile) |
| 48 | } |
| 49 | return stack, err |
| 50 | } |
| 51 | |
| 52 | // LoadStackFromPath loads a stack from the specified path. |
| 53 | func LoadStackFromPath(path string) (*Stack, error) { |
no test coverage detected