provider/heroku: scope valid stage names to func
This commit is contained in:
parent
02bb1e6907
commit
61f45dd585
|
@ -7,14 +7,14 @@ import (
|
|||
"github.com/satori/uuid"
|
||||
)
|
||||
|
||||
var validPipelineStageNames = []string{
|
||||
"review",
|
||||
"development",
|
||||
"staging",
|
||||
"production",
|
||||
}
|
||||
|
||||
func validatePipelineStageName(v interface{}, k string) (ws []string, errors []error) {
|
||||
validPipelineStageNames := []string{
|
||||
"review",
|
||||
"development",
|
||||
"staging",
|
||||
"production",
|
||||
}
|
||||
|
||||
for _, s := range validPipelineStageNames {
|
||||
if v == s {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue