MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / LoadAudioConfig

Function LoadAudioConfig

internal/audio/audio.go:120–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func 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}

Callers 1

loadAllDataFilesFunction · 0.92

Calls 4

GetFilePathsConfigFunction · 0.92
ReadFileFunction · 0.92
InfoFunction · 0.92
WrapMethod · 0.80

Tested by

no test coverage detected