// Print the contents of f using streaming. func cmdstream(ns *g9pc.Ns, s []string) { for _, fname := range s { r := ns.ReadStream(fname, 20, 10) _, err := io.Copy(os.Stdout, r) if err != nil { fmt.Fprintf(os.Stderr, "error reading %s: %v\n", fname, err) } r.Close() } }