(name string)
| 35 | ) |
| 36 | |
| 37 | func unmarshal[T any](name string) ([]*T, error) { |
| 38 | data, err := importConfigs.ReadFile(fmt.Sprintf("config/%s.json", name)) |
| 39 | if err != nil { |
| 40 | return nil, fmt.Errorf("fail to read file(%s): %v", name, err) |
| 41 | } |
| 42 | t := make([]*T, 0) |
| 43 | err = json.Unmarshal(data, &t) |
| 44 | return t, err |
| 45 | } |
| 46 | |
| 47 | var ( |
| 48 | _ IImportConfigController = (*imlImportConfigController)(nil) |
nothing calls this directly
no outgoing calls
no test coverage detected