WIP another pass on the app new command

This commit is contained in:
2021-07-30 22:55:00 +02:00
parent e728bcd7ac
commit 5771f6c158
3 changed files with 58 additions and 9 deletions

View File

@ -203,7 +203,7 @@ func GetAppStatuses(appFiles AppFiles) (map[string]string, error) {
// TODO: maybe better names than read and get
func readAppFile(appFile AppFile, name AppName) (App, error) {
env, err := readEnv(appFile.Path)
env, err := ReadEnv(appFile.Path)
if err != nil {
return App{}, fmt.Errorf("env file for '%s' couldn't be read: %s", name, err.Error())
}
@ -214,7 +214,7 @@ func readAppFile(appFile AppFile, name AppName) (App, error) {
return app, nil
}
func readEnv(filePath string) (AppEnv, error) {
func ReadEnv(filePath string) (AppEnv, error) {
var envFile AppEnv
envFile, err := godotenv.Read(filePath)
if err != nil {