()
| 118 | } |
| 119 | |
| 120 | func LoadAudioConfig() { |
| 121 | |
| 122 | start := time.Now() |
| 123 | |
| 124 | path := string(configs.GetFilePathsConfig().DataFiles) + `/audio.yaml` |
| 125 | |
| 126 | bytes, err := util.ReadFile(path) |
| 127 | if err != nil { |
| 128 | panic(errors.Wrap(err, `filepath: `+path)) |
| 129 | } |
| 130 | |
| 131 | clear(audioLookup) |
| 132 | |
| 133 | err = yaml.Unmarshal(bytes, &audioLookup) |
| 134 | if err != nil { |
| 135 | panic(errors.Wrap(err, `filepath: `+path)) |
| 136 | } |
| 137 | |
| 138 | mudlog.Info("...LoadAudioConfig()", "loadedCount", len(audioLookup), "Time Taken", time.Since(start)) |
| 139 | } |
no test coverage detected