Move printLogs from oci.go to sandbox.go
It's not OCI-specific, so it makes more sense in the file that exports it to the world. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>v0.8
parent
25f50eb711
commit
7369864344
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
@ -68,13 +66,3 @@ func (s *oci) New(cfg *BackendConfig) (Backend, func() error, error) {
|
|||
rootless: s.uid != 0,
|
||||
}, stop, nil
|
||||
}
|
||||
|
||||
func printLogs(logs map[string]*bytes.Buffer, f func(args ...interface{})) {
|
||||
for name, l := range logs {
|
||||
f(name)
|
||||
s := bufio.NewScanner(l)
|
||||
for s.Scan() {
|
||||
f(s.Text())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,3 +212,13 @@ func rootlessSupported(uid int) bool {
|
|||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func printLogs(logs map[string]*bytes.Buffer, f func(args ...interface{})) {
|
||||
for name, l := range logs {
|
||||
f(name)
|
||||
s := bufio.NewScanner(l)
|
||||
for s.Scan() {
|
||||
f(s.Text())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue