This repository was archived by the owner on Dec 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change 66 "fmt"
77 "os"
88 "path/filepath"
9- "regexp"
109 "sort"
1110 "strings"
1211
@@ -59,10 +58,6 @@ func cmdCreateInner(c CommandLine, api libmachine.API) error {
5958 return fmt .Errorf ("Error creating machine: %s" , mcnerror .ErrInvalidHostname )
6059 }
6160
62- if err := validateSwarmDiscovery (c .String ("swarm-discovery" )); err != nil {
63- return fmt .Errorf ("Error parsing swarm discovery: %s" , err )
64- }
65-
6661 // TODO: Fix hacky JSON solution
6762 rawDriver , err := json .Marshal (& drivers.BaseDriver {
6863 MachineName : name ,
@@ -332,23 +327,6 @@ func addDriverFlagsToCommand(cliFlags []cli.Flag, cmd *cli.Command) *cli.Command
332327 return cmd
333328}
334329
335- func validateSwarmDiscovery (discovery string ) error {
336- if discovery == "" {
337- return nil
338- }
339-
340- matched , err := regexp .MatchString (`[^:]*://.*` , discovery )
341- if err != nil {
342- return err
343- }
344-
345- if matched {
346- return nil
347- }
348-
349- return fmt .Errorf ("Swarm Discovery URL was in the wrong format: %s" , discovery )
350- }
351-
352330func tlsPath (c CommandLine , flag string , defaultName string ) string {
353331 path := c .GlobalString (flag )
354332 if path != "" {
You can’t perform that action at this time.
0 commit comments