aboutsummaryrefslogtreecommitdiff
path: root/weed/shell
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell')
-rw-r--r--weed/shell/command_remote_configure.go11
-rw-r--r--weed/shell/command_remote_mount.go5
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
}