forked from toolshed/abra
refactor(recipe): move SampleEnv method to new struct
This commit is contained in:
@ -238,15 +238,6 @@ func Get(recipeName string, offline bool) (Recipe, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r Recipe) SampleEnv() (map[string]string, error) {
|
||||
envSamplePath := path.Join(config.RECIPES_DIR, r.Name, ".env.sample")
|
||||
sampleEnv, err := envfile.ReadEnv(envSamplePath)
|
||||
if err != nil {
|
||||
return sampleEnv, fmt.Errorf("unable to discover .env.sample for %s", r.Name)
|
||||
}
|
||||
return sampleEnv, nil
|
||||
}
|
||||
|
||||
func Get2(name string) Recipe2 {
|
||||
return Recipe2{
|
||||
Name: name,
|
||||
|
Reference in New Issue
Block a user