Move ListOps to utils submodule

This will be needed for later use in docker-init without a docker
dependency
This commit is contained in:
Alexander Larsson
2013-10-25 15:13:24 -07:00
committed by Victor Vieux
parent 249f5a65a5
commit d063c8d941
6 changed files with 23 additions and 23 deletions
+12
View File
@@ -21,6 +21,18 @@ import (
"time"
)
// 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 {