MCPcopy Create free account
hub / github.com/chain/txvm / getReader

Function getReader

cmd/bcstate/bcstate.go:65–76  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

63}
64
65func getReader(arg string) io.ReadCloser {
66 switch arg {
67 case "":
68 return nil
69 case "-":
70 return os.Stdin
71 default:
72 f, err := os.Open(arg)
73 must(err)
74 return f
75 }
76}
77
78func must(err error) {
79 if err != nil {

Callers 1

mainFunction · 0.85

Calls 1

mustFunction · 0.70

Tested by

no test coverage detected