Swap statement

This commit is contained in:
Svilen Markov 2025-03-12 10:29:29 +00:00
parent be02e2746f
commit 6a193d4246

View file

@ -199,11 +199,11 @@ func fetchAndParseCustomAPI(
var data *customAPIResponseData
data, localErr = fetchCustomAPIRequest(ctx, req)
mu.Lock()
if localErr != nil && err == nil {
if localErr == nil {
subData[key] = data
} else if err == nil {
err = localErr
cancel()
} else {
subData[key] = data
}
mu.Unlock()
}()