mirror of
https://github.com/rclone/rclone.git
synced 2025-06-04 19:24:35 +08:00
rc: add support for Go 1.6
This commit is contained in:
15
fs/rc/rc_new.go
Normal file
15
fs/rc/rc_new.go
Normal file
@ -0,0 +1,15 @@
|
||||
//+build go1.7
|
||||
|
||||
package rc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
)
|
||||
|
||||
// WriteJSON writes JSON in out to w
|
||||
func WriteJSON(w io.Writer, out Params) error {
|
||||
enc := json.NewEncoder(w)
|
||||
enc.SetIndent("", "\t")
|
||||
return enc.Encode(out)
|
||||
}
|
Reference in New Issue
Block a user