stash/pkg/api
SmallCoccinelle 214a15bc40
Fixups + enable the commentFormatting linter (#1866)
* Add a space after // comments

For consistency, the commentFormatting lint checker suggests a space
after each // comment block. This commit handles all the spots in
the code where that is needed.

* Rewrite documentation on functions

Use the Go idiom of commenting:

* First sentence declares the purpose.
* First word is the name being declared

The reason this style is preferred is such that grep is able to find
names the user might be interested in. Consider e.g.,

    go doc -all pkg/ffmpeg | grep -i transcode

in which case a match will tell you the name of the function you are
interested in.

* Remove old code comment-blocks

There are some commented out old code blocks in the code base. These are
either 3 years old, or 2 years old. By now, I don't think their use is
going to come back any time soon, and Git will track old pieces of
deleted code anyway.

Opt for deletion.

* Reorder imports

Split stdlib imports from non-stdlib imports in files we are touching.

* Use a range over an iteration variable

Probably more go-idiomatic, and the code needed comment-fixing anyway.

* Use time.After rather than rolling our own

The idiom here is common enough that the stdlib contains a function for
it. Use the stdlib function over our own variant.

* Enable the commentFormatting linter
2021-10-20 16:10:46 +11:00
..
urlbuilders Generate screenshot images for markers (#1604) 2021-09-15 12:27:05 +10:00
authentication.go Errorlint sweep + minor linter tweaks (#1796) 2021-10-12 14:03:08 +11:00
changeset_translator.go Remove assignments to _ (#1685) 2021-09-07 13:18:32 +10:00
check_version.go Fixups + enable the commentFormatting linter (#1866) 2021-10-20 16:10:46 +11:00
context_keys.go Remove unused (#1709) 2021-09-09 14:10:08 +10:00
images.go refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00
locale.go Add collation to directory listings (#1823) 2021-10-14 15:16:45 +11:00
resolver.go Fixups + enable the commentFormatting linter (#1866) 2021-10-20 16:10:46 +11:00
resolver_model_gallery.go Add CreatedAt & UpdatedAt to all object resolvers (#1421) 2021-05-25 10:56:34 +10:00
resolver_model_image.go Add CreatedAt & UpdatedAt to all object resolvers (#1421) 2021-05-25 10:56:34 +10:00
resolver_model_movie.go Movie card visual consistency (#1758) 2021-09-26 13:52:08 +10:00
resolver_model_performer.go Add movie count to performer and studio card (#1760) 2021-09-27 11:31:49 +10:00
resolver_model_scene.go Fix inf values causing marshal error (#1607) 2021-08-03 14:29:57 +10:00
resolver_model_scene_marker.go Generate screenshot images for markers (#1604) 2021-09-15 12:27:05 +10:00
resolver_model_studio.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
resolver_model_tag.go Tag hierarchy (#1519) 2021-09-09 14:58:43 +10:00
resolver_mutation_configure.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
resolver_mutation_dlna.go DLNA (#1364) 2021-05-20 16:58:43 +10:00
resolver_mutation_gallery.go Plugin hooks (#1452) 2021-06-11 17:24:58 +10:00
resolver_mutation_image.go Plugin hooks (#1452) 2021-06-11 17:24:58 +10:00
resolver_mutation_job.go Job queueing (#1379) 2021-05-24 14:24:18 +10:00
resolver_mutation_metadata.go refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00
resolver_mutation_movie.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
resolver_mutation_performer.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
resolver_mutation_plugin.go Errcheck phase 1 (#1715) 2021-09-21 09:34:25 +10:00
resolver_mutation_saved_filter.go Saved filters (#1474) 2021-06-16 14:53:32 +10:00
resolver_mutation_scene.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
resolver_mutation_scraper.go Refactor xpath scraper code. Add fixed and map (#616) 2020-07-21 14:06:25 +10:00
resolver_mutation_stash_box.go Plugin hooks (#1452) 2021-06-11 17:24:58 +10:00
resolver_mutation_studio.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
resolver_mutation_tag.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
resolver_mutation_tag_test.go Plugin hooks (#1452) 2021-06-11 17:24:58 +10:00
resolver_query_configuration.go Add collation to directory listings (#1823) 2021-10-14 15:16:45 +11:00
resolver_query_dlna.go DLNA (#1364) 2021-05-20 16:58:43 +10:00
resolver_query_find_gallery.go Data layer restructuring (#997) 2021-01-18 12:23:20 +11:00
resolver_query_find_image.go Fix: unhandled errors (#1419) 2021-05-25 18:40:51 +10:00
resolver_query_find_movie.go Remove slim graphql endpoints (#1207) 2021-03-17 11:17:01 +11:00
resolver_query_find_performer.go Remove slim graphql endpoints (#1207) 2021-03-17 11:17:01 +11:00
resolver_query_find_saved_filter.go Saved filters (#1474) 2021-06-16 14:53:32 +10:00
resolver_query_find_scene.go Fix: unhandled errors (#1419) 2021-05-25 18:40:51 +10:00
resolver_query_find_scene_marker.go Data layer restructuring (#997) 2021-01-18 12:23:20 +11:00
resolver_query_find_studio.go Remove slim graphql endpoints (#1207) 2021-03-17 11:17:01 +11:00
resolver_query_find_tag.go Remove slim graphql endpoints (#1207) 2021-03-17 11:17:01 +11:00
resolver_query_job.go Job queueing (#1379) 2021-05-24 14:24:18 +10:00
resolver_query_logs.go Change thumbnail default size and resize algorithm (#336) 2020-01-31 17:19:15 -05:00
resolver_query_metadata.go Job queueing (#1379) 2021-05-24 14:24:18 +10:00
resolver_query_plugin.go Add plugin tasks (#651) 2020-08-08 12:05:35 +10:00
resolver_query_scene.go Setup and migration UI refactor (#1190) 2021-04-12 09:31:33 +10:00
resolver_query_scraper.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
resolver_subscription_job.go Remove unused (#1709) 2021-09-09 14:10:08 +10:00
resolver_subscription_logging.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
routes_downloads.go Selective export (#770) 2020-09-15 17:28:53 +10:00
routes_image.go Scan refactor (#1816) 2021-10-15 10:39:48 +11:00
routes_movie.go Errcheck phase 1 (#1715) 2021-09-21 09:34:25 +10:00
routes_performer.go Errcheck phase 1 (#1715) 2021-09-21 09:34:25 +10:00
routes_scene.go Scan refactor (#1816) 2021-10-15 10:39:48 +11:00
routes_studio.go Errcheck phase 1 (#1715) 2021-09-21 09:34:25 +10:00
routes_tag.go Errcheck phase 1 (#1715) 2021-09-21 09:34:25 +10:00
server.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
session.go Errorlint sweep + minor linter tweaks (#1796) 2021-10-12 14:03:08 +11:00
types.go Fix inf values causing marshal error (#1607) 2021-08-03 14:29:57 +10:00