geziyor/export/pprint.go
Musab Gültekin 0eda056065 Attribute extractor added. HTML extractor added. Outer HTML Extractor added.
exporter package renamed to export, extractor package renamed to extract for simplicity.
2019-06-30 22:20:17 +03:00

21 lines
397 B
Go

package export
import (
"encoding/json"
"fmt"
)
// PrettyPrint logs exported data to console as pretty printed
type PrettyPrint struct{}
// Export logs exported data to console as pretty printed
func (*PrettyPrint) Export(exports chan interface{}) {
for res := range exports {
dat, err := json.MarshalIndent(res, "", " ")
if err != nil {
continue
}
fmt.Println(string(dat))
}
}