clean code, add golangci config, preallocate some slices and avoid copying body before parsing json (#9)
This commit is contained in:
parent
0a146c515c
commit
c7a2612056
12 changed files with 49 additions and 45 deletions
|
@ -176,7 +176,7 @@ func GetVideoAPI(
|
|||
decoder := sonic.ConfigFastest.NewDecoder(resp.Body)
|
||||
err = decoder.Decode(&data)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to unmarshal response: %w", err)
|
||||
return nil, fmt.Errorf("failed to decode response: %w", err)
|
||||
}
|
||||
videoData, err := FindVideoData(data, awemeID)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue