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"
|
"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
|
||||||
|
|
Loading…
Reference in New Issue