diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-08-08 01:21:42 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-08-08 01:21:42 -0700 |
| commit | 13e45e16054d16e8d8161a8ddb02fde3cd4cde8f (patch) | |
| tree | 29d7b15932e10b0adafe2b27b3618e330805f75c /weed/shell | |
| parent | 8f5170c1389f2d0bac75ca2f95a676a05283317b (diff) | |
| download | seaweedfs-13e45e16054d16e8d8161a8ddb02fde3cd4cde8f.tar.xz seaweedfs-13e45e16054d16e8d8161a8ddb02fde3cd4cde8f.zip | |
filer.remote.sync can work now
Diffstat (limited to 'weed/shell')
| -rw-r--r-- | weed/shell/command_remote_configure.go | 11 | ||||
| -rw-r--r-- | weed/shell/command_remote_mount.go | 5 |
2 files changed, 13 insertions, 3 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 }) } diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go index 73a5119d5..37b235a55 100644 --- a/weed/shell/command_remote_mount.go +++ b/weed/shell/command_remote_mount.go @@ -88,7 +88,10 @@ func (c *commandRemoteMount) listExistingRemoteStorageMounts(commandEnv *Command Indent: " ", } - return m.Marshal(writer, mappings) + err = m.Marshal(writer, mappings) + fmt.Fprintln(writer) + + return } |
