provider/heroku: scope valid stage names to func

This commit is contained in:
Justin Campbell 2017-05-01 10:20:51 -04:00
parent 02bb1e6907
commit 61f45dd585
1 changed files with 7 additions and 7 deletions

View File

@ -7,14 +7,14 @@ import (
"github.com/satori/uuid" "github.com/satori/uuid"
) )
var validPipelineStageNames = []string{ func validatePipelineStageName(v interface{}, k string) (ws []string, errors []error) {
validPipelineStageNames := []string{
"review", "review",
"development", "development",
"staging", "staging",
"production", "production",
} }
func validatePipelineStageName(v interface{}, k string) (ws []string, errors []error) {
for _, s := range validPipelineStageNames { for _, s := range validPipelineStageNames {
if v == s { if v == s {
return return