mirror of
https://github.com/johnkerl/miller.git
synced 2026-08-01 04:01:58 +00:00
27 lines
379 B
Go
27 lines
379 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"encoding/json"
|
|
|
|
"miller/types"
|
|
)
|
|
|
|
// ----------------------------------------------------------------
|
|
func main() {
|
|
decoder := json.NewDecoder(os.Stdin)
|
|
|
|
for {
|
|
mlrval, eof, err := types.MlrvalDecodeFromJSON(decoder)
|
|
if eof {
|
|
break
|
|
}
|
|
if err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
fmt.Println(mlrval)
|
|
}
|
|
}
|