Skip to content

Commit

Permalink
fix: panic on shared config network fetching (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrun5 authored Oct 23, 2024
1 parent 4a3613b commit 6cd6397
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func Run() error {

var configuration *config.Config
if configURL != "" {
configuration, err = config.GetSharedConfigFromNetwork(configURL, configuration)
configuration, err = config.GetSharedConfigFromNetwork(configURL)
panicOnError(err)
}

Expand Down
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ func GetConfigFromFile(path string, config *Config) (*Config, error) {
}

// GetSharedConfigFromNetwork fetches shared configuration from URL and parses it.
func GetSharedConfigFromNetwork(url string, config *Config) (*Config, error) {
func GetSharedConfigFromNetwork(url string) (*Config, error) {
rawConfig := RawConfig{}
config := &Config{}

resp, err := http.Get(url)
if err != nil {
Expand Down

0 comments on commit 6cd6397

Please sign in to comment.