mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 19:44:01 +08:00
cmds: use w.Write directly
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
This commit is contained in:
@ -93,7 +93,7 @@ baz
|
||||
|
||||
// error if we aren't running node in online mode
|
||||
if nd.LocalMode() {
|
||||
return err
|
||||
return ErrNotOnline
|
||||
}
|
||||
|
||||
fsdir, found := req.Options[mountIPFSPathOptionName].(string)
|
||||
@ -120,9 +120,9 @@ baz
|
||||
Type: config.Mounts{},
|
||||
Encoders: cmds.EncoderMap{
|
||||
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, mounts *config.Mounts) error {
|
||||
s := fmt.Sprintf("IPFS mounted at: %s\n", mounts.IPFS)
|
||||
s += fmt.Sprintf("IPNS mounted at: %s\n", mounts.IPNS)
|
||||
fmt.Fprint(w, s)
|
||||
fmt.Fprintf(w, "IPFS mounted at: %s\n", mounts.IPFS)
|
||||
fmt.Fprintf(w, "IPNS mounted at: %s\n", mounts.IPNS)
|
||||
|
||||
return nil
|
||||
}),
|
||||
},
|
||||
|
Reference in New Issue
Block a user