amo/scripts/len.xgo

16 lines
211 B
Text
Raw Normal View History

os := import("os")
fmt := import("fmt")
sjson := import("cjson")
dec := cjson.new_decoder("<stdin>")
//file_path := args[0]
n := 0
for {
v := dec.decode()
if !v {break}
n++
fmt.println(n)
}
fmt.println(n)