Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Fix newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
polskikiel committed Aug 23, 2019
1 parent 3ad4681 commit 0a441b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions internal/addon/provider/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ func (cli *ClientFactory) NewGetter(rawURL, instPath string) (AddonClient, error
return nil, err
}

if fullRealAddr != rawURL {
cli.log.Infof("[TRACE] go-getter detectors rewrote %q to %q", rawURL, fullRealAddr)
}

// get schema + source address
fullRealAddrURL, err := url.Parse(fullRealAddr)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (c *common) loadRepositories(repos []v1alpha1.SpecRepository) *repository.C

addonsURL := specRepository.URL
if specRepository.SecretRef != nil {
c.log.Infof("- templating URL using secret %s/%s", specRepository.SecretRef.Name, specRepository.SecretRef.Namespace)
c.log.Infof("- templating URL using secret `%s/%s`", specRepository.SecretRef.Name, specRepository.SecretRef.Namespace)
templateURL, err := c.templateService.TemplateURL(specRepository)
if err != nil {
repo.TemplatingError(err)
Expand All @@ -267,7 +267,7 @@ func (c *common) loadRepositories(repos []v1alpha1.SpecRepository) *repository.C
if err != nil {
repo.FetchingError(err)
repositories.AddRepository(repo)
c.log.Errorf("while creating addons for repository from %q: %s", specRepository.URL, err)
c.log.Errorf("while creating addons for repository from %s: %v", specRepository.URL, err)
continue
}

Expand Down Expand Up @@ -447,7 +447,7 @@ func (c *common) reprocessConfigurationsInConflict(deletedAddonsIDs []string, li
if hasConflict := c.isConfigurationInConflict(id, configuration.Status); hasConflict {
c.log.Infof("- reprocessing conflicting addons configuration `%s/%s`", configuration.Meta.Namespace, configuration.Meta.Name)
if err := c.commonClient.ReprocessRequest(configuration.Meta.Name); err != nil {
return errors.Wrapf(err, "while reprocessing conflicting addons configuration %s", configuration.Meta.Name)
return errors.Wrapf(err, "while reprocessing conflicting addons configuration `%s`", configuration.Meta.Name)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/repository/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func (t *Template) TemplateURL(repository v1alpha1.SpecRepository) (string, erro
if !ok {
return "", fmt.Errorf("secret does not contain `%s` field", fieldName)
}
result = strings.Replace(result, val, string(tmp), 1)
result = strings.Replace(result, val, string(tmp), -1)
}

return result, nil
return strings.Replace(result, "\n", "", -1), nil
}

func (t *Template) findURLTemplates(url string) []string {
Expand Down

0 comments on commit 0a441b7

Please sign in to comment.