19 lines
417 B
Go
19 lines
417 B
Go
package recipe
|
|
|
|
import (
|
|
"fmt"
|
|
"path"
|
|
|
|
"coopcloud.tech/abra/pkg/config"
|
|
"coopcloud.tech/abra/pkg/envfile"
|
|
)
|
|
|
|
func (r Recipe2) 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
|
|
}
|