Skip to content

Commit

Permalink
fix: bug on job and resource path default value
Browse files Browse the repository at this point in the history
  • Loading branch information
irainia committed Apr 11, 2022
1 parent 73caf84 commit 329579d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func askInitClientConfig(l log.Logger, dirPath string) (*config.ClientConfig, er
if err != nil {
return nil, err
}
output.Version = config.DefaultVersion
output.Host = host
output.Project = project
output.Namespaces = namespaces
Expand All @@ -133,12 +134,12 @@ func askInitNamespaces(l log.Logger, dirPath string) ([]*config.Namespace, error
Datastore: []config.Datastore{
{
Type: datastoreType,
Path: path.Join(dirPath, name, "resources"),
Path: path.Join(name, "resources"),
Backup: make(map[string]string),
},
},
Job: config.Job{
Path: path.Join(dirPath, name, "jobs"),
Path: path.Join(name, "jobs"),
},
}
output = append(output, namespace)
Expand Down
2 changes: 2 additions & 0 deletions config/config_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ type Config interface{}
// Version implement fmt.Stringer
type Version int

const DefaultVersion Version = 1

type LogLevel string

const (
Expand Down

0 comments on commit 329579d

Please sign in to comment.