13 lines
178 B
Go
13 lines
178 B
Go
package format
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type jsonWriter struct {
|
|
encoder *json.Encoder
|
|
}
|
|
|
|
func (j *jsonWriter) Write(in interface{}) error {
|
|
return j.encoder.Encode(in)
|
|
}
|