func printHash(o *mhopts.Options, r io.Reader) error { h, err := o.Multihash(r) if err != nil { return err } s, err := mhopts.Encode(o.Encoding, h) if err != nil { return err } if quiet { fmt.Print(s) } else { fmt.Println(s) } return nil }