Skip to content

Commit

Permalink
Merge pull request #260 from thaJeztah/switch_proto
Browse files Browse the repository at this point in the history
cmd/continuity: switch to google.golang.org/protobuf/proto
  • Loading branch information
AkihiroSuda authored Oct 28, 2024
2 parents 2fab5e9 + fd64705 commit c156753
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions cmd/continuity/commands/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
package commands

import (
"fmt"
"io"
"log"
"os"

pb "github.com/containerd/continuity/proto"
"github.com/golang/protobuf/proto"
"github.com/spf13/cobra"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/proto"
)

var DumpCmd = &cobra.Command{
Expand Down Expand Up @@ -51,10 +53,7 @@ var DumpCmd = &cobra.Command{
log.Fatalf("error unmarshaling manifest: %v", err)
}

// TODO(stevvooe): For now, just dump the text format. Turn this into
// nice text output later.
if err := proto.MarshalText(os.Stdout, &bm); err != nil {
log.Fatalf("error dumping manifest: %v", err)
}
// TODO(stevvooe): For now, just dump the text format. Turn this into nice text output later.
_, _ = fmt.Fprintln(os.Stdout, prototext.Format(&bm))
},
}
2 changes: 1 addition & 1 deletion cmd/continuity/commands/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"text/tabwriter"

pb "github.com/containerd/continuity/proto"
"github.com/golang/protobuf/proto"
"github.com/spf13/cobra"
"google.golang.org/protobuf/proto"
)

var (
Expand Down

0 comments on commit c156753

Please sign in to comment.