mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: fix migrate in outputing client.Node to json
Using printf will try to parse the string and replace special characters. In migrate code, we want to just output the raw json string of client.Node. For example, Printf("%\\") => %!\(MISSING) Print("%\\") => %\ Thus, we should use print instead.
This commit is contained in:
parent
3fd64f913a
commit
c05c027a24
@ -220,7 +220,7 @@ func writeKeys(w io.Writer, n *store.NodeExtern) uint64 {
|
||||
if err != nil {
|
||||
ExitWithError(ExitError, err)
|
||||
}
|
||||
fmt.Fprintf(w, string(b))
|
||||
fmt.Fprint(w, string(b))
|
||||
for _, nn := range nodes {
|
||||
max := writeKeys(w, nn)
|
||||
if max > maxIndex {
|
||||
|
Loading…
x
Reference in New Issue
Block a user