Skip to content

Commit

Permalink
Moved zero module yaml file name to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
bmonkman committed Jun 3, 2020
1 parent 03394b7 commit 71695cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/config/globalconfig/global_config.go
Expand Up @@ -71,7 +71,7 @@ func getCredentialsPath() string {

rootDir := path.Join(usr.HomeDir, constants.ZeroHomeDirectory)
os.MkdirAll(rootDir, os.ModePerm)
filePath := path.Join(rootDir, constants.UserCredentials)
filePath := path.Join(rootDir, constants.UserCredentialsYml)
return filePath
}

Expand Down
13 changes: 7 additions & 6 deletions internal/constants/constants.go
@@ -1,10 +1,11 @@
package constants

const (
TemplatesDir = "tmp/templates"
ZeroProjectYml = "zero-project.yml"
ZeroHomeDirectory = ".zero"
UserCredentials = "credentials.yml"
IgnoredPaths = "(?i)zero.module.yml|.git/"
TemplateExtn = ".tmpl"
TemplatesDir = "tmp/templates"
ZeroProjectYml = "zero-project.yml"
ZeroModuleYml = "zero-module.yml"
UserCredentialsYml = "credentials.yml"
ZeroHomeDirectory = ".zero"
IgnoredPaths = "(?i)zero.module.yml|.git/"
TemplateExtn = ".tmpl"
)
2 changes: 1 addition & 1 deletion internal/module/module.go
Expand Up @@ -49,7 +49,7 @@ func NewTemplateModule(moduleCfg config.ModuleInstance) (*TemplateModule, error)
}
}

configPath := path.Join(sourcePath, "zero-module.yml")
configPath := path.Join(sourcePath, constants.ZeroModuleYml)
moduleConfig := moduleconfig.LoadModuleConfig(configPath)
templateModule.Config = *moduleConfig

Expand Down

0 comments on commit 71695cd

Please sign in to comment.