Skip to content

Commit

Permalink
dbTemplateURI should be const
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksinghggits committed Feb 21, 2020
1 parent 9ed9be4 commit e1c62dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,3 @@ stop-minishift:

stop-kind:
@$(MAKE) run CMD='-c "./build/local_kubernetes.sh stop_localkube"'

6 changes: 5 additions & 1 deletion pkg/app/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ import (
"k8s.io/apimachinery/pkg/util/rand"
)

const (
dbTemplateURI = "https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/%s-persistent-template.json"
)

// appendRandString, appends a random string to the passed string value
func appendRandString(name string) string {
return fmt.Sprintf("%s-%s", name, rand.String(5))
Expand All @@ -29,5 +33,5 @@ func appendRandString(name string) string {
// db template for that application
// https://github.com/openshift/origin/tree/master/examples/db-templates
func getOpenShiftDBTemplate(appName string) string {
return fmt.Sprintf("https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/%s-persistent-template.json", appName)
return fmt.Sprintf(dbTemplateURI, appName)
}

0 comments on commit e1c62dd

Please sign in to comment.