aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_remote_mount.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-17 12:42:03 -0700
committerchrislu <chris.lu@gmail.com>2022-08-17 12:42:03 -0700
commit2b580a7566536fb229a50af94b67d9df46724f34 (patch)
tree73bd8091568909116fbb83cb1c5400c9ee004333 /weed/shell/command_remote_mount.go
parenteaeb141b09326aa7c4d1d1e7b7f27e119d019f9c (diff)
downloadseaweedfs-2b580a7566536fb229a50af94b67d9df46724f34.tar.xz
seaweedfs-2b580a7566536fb229a50af94b67d9df46724f34.zip
also migrate jsonpb
Diffstat (limited to 'weed/shell/command_remote_mount.go')
-rw-r--r--weed/shell/command_remote_mount.go13
1 files changed, 1 insertions, 12 deletions
diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go
index ef837a821..0f74729f1 100644
--- a/weed/shell/command_remote_mount.go
+++ b/weed/shell/command_remote_mount.go
@@ -9,7 +9,6 @@ import (
"github.com/seaweedfs/seaweedfs/weed/pb/remote_pb"
"github.com/seaweedfs/seaweedfs/weed/remote_storage"
"github.com/seaweedfs/seaweedfs/weed/util"
- "google.golang.org/protobuf/jsonpb"
"google.golang.org/protobuf/proto"
"io"
"os"
@@ -101,17 +100,7 @@ func listExistingRemoteStorageMounts(commandEnv *CommandEnv, writer io.Writer) (
}
func jsonPrintln(writer io.Writer, message proto.Message) error {
- if message == nil {
- return nil
- }
- m := jsonpb.Marshaler{
- EmitDefaults: false,
- Indent: " ",
- }
-
- err := m.Marshal(writer, message)
- fmt.Fprintln(writer)
- return err
+ return filer.ProtoToText(writer, message)
}
func syncMetadata(commandEnv *CommandEnv, writer io.Writer, dir string, nonEmpty bool, remoteConf *remote_pb.RemoteConf, remote *remote_pb.RemoteStorageLocation) error {