Merge pull request #2829 from dotcloud/refactor_opts

Refactor opts
This commit is contained in:
Michael Crosby
2013-12-02 10:41:30 -08:00
6 changed files with 191 additions and 137 deletions
-12
View File
@@ -34,18 +34,6 @@ type Fataler interface {
Fatal(args ...interface{})
}
// ListOpts type
type ListOpts []string
func (opts *ListOpts) String() string {
return fmt.Sprint(*opts)
}
func (opts *ListOpts) Set(value string) error {
*opts = append(*opts, value)
return nil
}
// Go is a basic promise implementation: it wraps calls a function in a goroutine,
// and returns a channel which will later return the function's return value.
func Go(f func() error) chan error {