MCPcopy
hub / github.com/MightyMoud/sidekick / ViperInit

Function ViperInit

utils/utils.go:126–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124}
125
126func ViperInit() error {
127 home, err := os.UserHomeDir()
128 cobra.CheckErr(err)
129
130 configPath := fmt.Sprintf("%s/.config/sidekick", home)
131
132 viper.AddConfigPath(configPath)
133 viper.SetConfigType("yaml")
134 viper.SetConfigName("default")
135 err = viper.ReadInConfig()
136 if err != nil {
137 return err
138 }
139 return nil
140}
141
142func LoadAppConfig() (SidekickAppConfig, error) {
143 if !FileExists("./sidekick.yml") {

Callers 5

init.goFile · 0.92
deploy.goFile · 0.92
launch.goFile · 0.92
preview.goFile · 0.92
remove.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected