wpt.fyi icon indicating copy to clipboard operation
wpt.fyi copied to clipboard

General Go Cleanup Issue

Open jcscottiii opened this issue 2 years ago • 3 comments

This issue is a catch-all for golang issues that would be great for a new person to look into.

  • [ ] #2983
  • [ ] #2984
  • [ ] Investigate the usage of both run_id and run_ids as query parameters. Consolidate if possible.
  • [ ] Create and reference query parameter constants.

Feel free to add others.

jcscottiii avatar Sep 07 '22 14:09 jcscottiii

Thanks for creating this! I added query parameter constants as you had mentioned.

DanielRyanSmith avatar Sep 07 '22 17:09 DanielRyanSmith

run_id and run_ids are interchangeable https://github.com/web-platform-tests/wpt.fyi/blob/8bf23a6f68d18acab002aa6a613fc5660afb0a85/shared/params.go#L538 There are APIs that process one run_id at a time but some process multiple run_ids

KyleJu avatar Sep 07 '22 18:09 KyleJu

In terms of lint, we have a lint check using golint on the CI. As of today, it is depreciated. We could consider golangci-lint or staticcheck

KyleJu avatar Sep 07 '22 18:09 KyleJu