summaryrefslogtreecommitdiffstats
path: root/cmd/ship/deploy_v2.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ship/deploy_v2.go')
-rw-r--r--cmd/ship/deploy_v2.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/ship/deploy_v2.go b/cmd/ship/deploy_v2.go
index 16e12db..af4e3a7 100644
--- a/cmd/ship/deploy_v2.go
+++ b/cmd/ship/deploy_v2.go
@@ -21,7 +21,7 @@ func deployV2(path string, opts deployV2Options) {
21 21
22 // Validate name if provided 22 // Validate name if provided
23 if opts.Name != "" { 23 if opts.Name != "" {
24 if err := validateName(opts.Name); err != nil { 24 if err := validateNameV2(opts.Name); err != nil {
25 output.PrintAndExit(err) 25 output.PrintAndExit(err)
26 } 26 }
27 } 27 }
@@ -157,8 +157,8 @@ type deployContext struct {
157 Opts deployV2Options 157 Opts deployV2Options
158} 158}
159 159
160// validateName checks if name matches allowed pattern 160// validateNameV2 checks if name matches allowed pattern
161func validateName(name string) *output.ErrorResponse { 161func validateNameV2(name string) *output.ErrorResponse {
162 // Must be lowercase alphanumeric with hyphens, 1-63 chars 162 // Must be lowercase alphanumeric with hyphens, 1-63 chars
163 pattern := regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$|^[a-z0-9]$`) 163 pattern := regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$|^[a-z0-9]$`)
164 if !pattern.MatchString(name) { 164 if !pattern.MatchString(name) {