3b1563a538
* hub.ConfigDir -> hub.InstallDir; hub.DataDir -> hub.InstallDataDir * cleanup GetInstalledItemsAsString() * lint: ReferenceMissingError -> ErrMissingReference * lint: parent_dir -> parentDir * link: export Walker type * lint: return error last * lint: shadow * move around and group variable definitions
24 lines
487 B
Go
24 lines
487 B
Go
package csconfig
|
|
|
|
/*cscli specific config, such as hub directory*/
|
|
type Hub struct {
|
|
HubIndexFile string
|
|
HubDir string
|
|
InstallDir string
|
|
InstallDataDir string
|
|
}
|
|
|
|
func (c *Config) LoadHub() error {
|
|
if err := c.LoadConfigurationPaths(); err != nil {
|
|
return err
|
|
}
|
|
|
|
c.Hub = &Hub{
|
|
HubIndexFile: c.ConfigPaths.HubIndexFile,
|
|
HubDir: c.ConfigPaths.HubDir,
|
|
InstallDir: c.ConfigPaths.ConfigDir,
|
|
InstallDataDir: c.ConfigPaths.DataDir,
|
|
}
|
|
|
|
return nil
|
|
}
|