1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

merge 'origin/master' into driver-refactor

This commit is contained in:
Evan Hazlett
2015-03-11 21:45:35 -04:00

View File

@@ -1,12 +1,15 @@
package utils
import (
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"
"runtime"
"time"
log "github.com/Sirupsen/logrus"
)
func GetHomeDir() string {
@@ -95,3 +98,13 @@ func WaitForSpecific(f func() bool, maxAttempts int, waitInterval time.Duration)
func WaitFor(f func() bool) error {
return WaitForSpecific(f, 60, 3*time.Second)
}
func DumpVal(vals ...interface{}) {
for _, val := range vals {
prettyJSON, err := json.MarshalIndent(val, "", " ")
if err != nil {
log.Fatal(err)
}
log.Debug(string(prettyJSON))
}
}