Merge pull request #16 from tonistiigi/change-dump-to-json
buildctl: use json for debuggingdocker-18.09
commit
d3b68425cd
|
@ -1,11 +1,10 @@
|
|||
package debug
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/tonistiigi/buildkit_poc/client/llb"
|
||||
|
@ -24,7 +23,12 @@ func dumpLLB(clicontext *cli.Context) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Print(spew.Sdump(ops))
|
||||
enc := json.NewEncoder(os.Stdout)
|
||||
for _, op := range ops {
|
||||
if err := enc.Encode(op); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue