Attribute extractor added. HTML extractor added. Outer HTML Extractor added.
exporter package renamed to export, extractor package renamed to extract for simplicity.
This commit is contained in:
20
export/pprint.go
Normal file
20
export/pprint.go
Normal file
@ -0,0 +1,20 @@
|
||||
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))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user