mirror of
https://github.com/stashapp/stash.git
synced 2025-12-15 04:44:28 +01:00
* Make copies of buffers Avoid reusing one of the incoming arrays as a append extension, and make a copy of the data. It's cleaner in the long run and possibly easier for the GC to maintain. * Avoid appendAssign problems in tag code Reuse the existing slice when appending. * Fix appendAssign in encoder_scene_preview_chunk Appending and creating a new slice is somewhat unintuitive since the underlying slice might be extended to satisfy the new capacity. This sometimes leads to faulty logic. Rewrite the code so it reuses `args` for all appending, and builds one array clearly in the code. It follows the general style of the function where `args` is being built in small incremental batches and avoids the introduction of new names. * Enable the appendAssign check This makes us pass all gocritic warnings. Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| filter.go | ||
| filter_internal_test.go | ||
| gallery.go | ||
| gallery_test.go | ||
| image.go | ||
| image_test.go | ||
| movies.go | ||
| movies_test.go | ||
| performer.go | ||
| performer_test.go | ||
| query.go | ||
| repository.go | ||
| saved_filter.go | ||
| saved_filter_test.go | ||
| scene.go | ||
| scene_marker.go | ||
| scene_marker_test.go | ||
| scene_test.go | ||
| scraped_item.go | ||
| setup_test.go | ||
| sql.go | ||
| stash_id_test.go | ||
| studio.go | ||
| studio_test.go | ||
| tag.go | ||
| tag_test.go | ||
| transaction.go | ||