ReadFile reads the content of the file with the given name in dnote dir
(ctx context.DnoteCtx, filename string)
| 98 | |
| 99 | // ReadFile reads the content of the file with the given name in dnote dir |
| 100 | func ReadFile(ctx context.DnoteCtx, filename string) []byte { |
| 101 | path := filepath.Join(ctx.Paths.LegacyDnote, filename) |
| 102 | |
| 103 | b, err := os.ReadFile(path) |
| 104 | if err != nil { |
| 105 | panic(err) |
| 106 | } |
| 107 | |
| 108 | return b |
| 109 | } |
| 110 | |
| 111 | // ReadJSON reads JSON fixture to the struct at the destination address |
| 112 | func ReadJSON(path string, destination interface{}) { |
no outgoing calls