2021-03-24 17:16:17 +00:00
|
|
|
package csconfig
|
|
|
|
|
|
|
|
/*cscli specific config, such as hub directory*/
|
|
|
|
type Hub struct {
|
2023-10-09 19:33:35 +00:00
|
|
|
HubIndexFile string
|
|
|
|
HubDir string
|
|
|
|
InstallDir string
|
|
|
|
InstallDataDir string
|
2021-03-24 17:16:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Config) LoadHub() error {
|
|
|
|
if err := c.LoadConfigurationPaths(); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
c.Hub = &Hub{
|
2023-10-09 19:33:35 +00:00
|
|
|
HubIndexFile: c.ConfigPaths.HubIndexFile,
|
|
|
|
HubDir: c.ConfigPaths.HubDir,
|
|
|
|
InstallDir: c.ConfigPaths.ConfigDir,
|
|
|
|
InstallDataDir: c.ConfigPaths.DataDir,
|
2021-03-24 17:16:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|