1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 15:24:32 +00:00

Bump libcompose and its dependencies

This commit is contained in:
Josh Curl
2016-05-23 17:22:40 -07:00
parent c18cd26e78
commit 50de80d09a
1109 changed files with 35052 additions and 125685 deletions

View File

@@ -2,7 +2,6 @@ package utils
import (
"encoding/json"
"fmt"
"sync"
"github.com/Sirupsen/logrus"
@@ -17,7 +16,7 @@ type InParallel struct {
pool sync.Pool
}
// Add adds runs the specified task in parallel and add it to the waitGroup.
// Add runs the specified task in parallel and adds it to the waitGroup.
func (i *InParallel) Add(task func() error) {
i.wg.Add(1)
@@ -30,7 +29,7 @@ func (i *InParallel) Add(task func() error) {
}()
}
// Wait waits for all tasks to complete and returns the latests error encountered if any.
// Wait waits for all tasks to complete and returns the latest error encountered if any.
func (i *InParallel) Wait() error {
i.wg.Wait()
obj := i.pool.Get()
@@ -112,22 +111,6 @@ func FilterString(data map[string][]string) string {
return string(bytes)
}
// LabelFilterString returns a label json string representation of the specifed couple (key,value)
// that is used as filter for docker.
func LabelFilterString(key, value string) string {
return FilterString(map[string][]string{
"label": {fmt.Sprintf("%s=%s", key, value)},
})
}
// LabelFilter returns a label map representation of the specifed couple (key,value)
// that is used as filter for docker.
func LabelFilter(key, value string) map[string][]string {
return map[string][]string{
"label": {fmt.Sprintf("%s=%s", key, value)},
}
}
// Contains checks if the specified string (key) is present in the specified collection.
func Contains(collection []string, key string) bool {
for _, value := range collection {