aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
Diffstat (limited to 'skate')
-rw-r--r--skate/cmd/skate-from-unstructured/main.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/skate/cmd/skate-from-unstructured/main.go b/skate/cmd/skate-from-unstructured/main.go
index 2ccdd7d..8682d8d 100644
--- a/skate/cmd/skate-from-unstructured/main.go
+++ b/skate/cmd/skate-from-unstructured/main.go
@@ -14,18 +14,20 @@ import (
)
var (
- numWorkers = flag.Int("w", runtime.NumCPU(), "number of workers")
- batchSize = flag.Int("b", 100000, "batch size")
- bytesNewline = []byte("\n")
+ numWorkers = flag.Int("w", runtime.NumCPU(), "number of workers")
+ batchSize = flag.Int("b", 100000, "batch size")
)
func main() {
pp := parallel.NewProcessor(os.Stdin, os.Stdout, func(p []byte) ([]byte, error) {
- var ref skate.Ref
- if err := json.Unmarshal(p, &ref); err != nil {
+ var (
+ ref skate.Ref
+ err error
+ )
+ if err = json.Unmarshal(p, &ref); err != nil {
return nil, err
}
- if err := skate.ParseUnstructured(&ref); err != nil {
+ if err = skate.ParseUnstructured(&ref); err != nil {
return nil, err
}
return skate.JsonMarshalNewline(&ref)