aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_remote_configure.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-08-08 01:21:42 -0700
committerChris Lu <chris.lu@gmail.com>2021-08-08 01:21:42 -0700
commit13e45e16054d16e8d8161a8ddb02fde3cd4cde8f (patch)
tree29d7b15932e10b0adafe2b27b3618e330805f75c /weed/shell/command_remote_configure.go
parent8f5170c1389f2d0bac75ca2f95a676a05283317b (diff)
downloadseaweedfs-13e45e16054d16e8d8161a8ddb02fde3cd4cde8f.tar.xz
seaweedfs-13e45e16054d16e8d8161a8ddb02fde3cd4cde8f.zip
filer.remote.sync can work now
Diffstat (limited to 'weed/shell/command_remote_configure.go')
-rw-r--r--weed/shell/command_remote_configure.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/weed/shell/command_remote_configure.go b/weed/shell/command_remote_configure.go
index 20ded5f5b..7a9ad1f65 100644
--- a/weed/shell/command_remote_configure.go
+++ b/weed/shell/command_remote_configure.go
@@ -7,6 +7,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/filer"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/util"
+ "github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"io"
"regexp"
@@ -96,9 +97,15 @@ func (c *commandRemoteConfigure) listExistingRemoteStorages(commandEnv *CommandE
conf.S3SecretKey = ""
- fmt.Fprintf(writer, "%+v\n", conf)
+ m := jsonpb.Marshaler{
+ EmitDefaults: false,
+ Indent: " ",
+ }
- return nil
+ err := m.Marshal(writer, conf)
+ fmt.Fprintln(writer)
+
+ return err
})
}