|
@@ -13,6 +13,7 @@ type ConfigurationPaths struct {
|
|
|
HubDir string `yaml:"hub_dir,omitempty"`
|
|
|
PluginDir string `yaml:"plugin_dir,omitempty"`
|
|
|
NotificationDir string `yaml:"notification_dir,omitempty"`
|
|
|
+ PatternDir string `yaml:"pattern_dir,omitempty"`
|
|
|
}
|
|
|
|
|
|
func (c *Config) loadConfigurationPaths() error {
|
|
@@ -33,6 +34,10 @@ func (c *Config) loadConfigurationPaths() error {
|
|
|
c.ConfigPaths.HubIndexFile = filepath.Clean(c.ConfigPaths.HubDir + "/.index.json")
|
|
|
}
|
|
|
|
|
|
+ if c.ConfigPaths.PatternDir == "" {
|
|
|
+ c.ConfigPaths.PatternDir = filepath.Join(c.ConfigPaths.ConfigDir, "patterns/")
|
|
|
+ }
|
|
|
+
|
|
|
var configPathsCleanup = []*string{
|
|
|
&c.ConfigPaths.HubDir,
|
|
|
&c.ConfigPaths.HubIndexFile,
|
|
@@ -41,6 +46,7 @@ func (c *Config) loadConfigurationPaths() error {
|
|
|
&c.ConfigPaths.SimulationFilePath,
|
|
|
&c.ConfigPaths.PluginDir,
|
|
|
&c.ConfigPaths.NotificationDir,
|
|
|
+ &c.ConfigPaths.PatternDir,
|
|
|
}
|
|
|
for _, k := range configPathsCleanup {
|
|
|
if *k == "" {
|