clen.xgo 143 B

12345678910111213
  1. dec := import("cjson").new_decoder("<stdin>")
  2. fmt := import("fmt")
  3. i := 0
  4. for {
  5. h := dec.decode()
  6. if !h {
  7. break
  8. }
  9. i++
  10. }
  11. fmt.println(i)