improve usage for discovery

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux 2015-08-01 16:53:07 -07:00
parent bf4bb808e7
commit 28bc55ed6b
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@ Arguments:
* etcd://<ip1>,<ip2>/<path>
* file://path/to/file
* zk://<ip1>,<ip2>/<path>
* <ip1>,<ip2>{{end}}{{if .Flags}}
* [nodes://]<ip1>,<ip2>{{end}}{{if .Flags}}
Options:
{{range .Flags}}{{.}}

View File

@ -1,6 +1,7 @@
package nodes
import (
"fmt"
"strings"
"time"
@ -27,7 +28,7 @@ func (s *Discovery) Initialize(uris string, _ time.Duration, _ time.Duration) er
for _, ip := range discovery.Generate(input) {
entry, err := discovery.NewEntry(ip)
if err != nil {
return err
return fmt.Errorf("%s, please check you are using the correct discovery (missing token:// ?)", err.Error())
}
s.entries = append(s.entries, entry)
}