Commit Graph

6 Commits

Author SHA1 Message Date
Ville Vesilehto
53e9681a39
lint: enable protogetter linter (#7336)
Enable protogetter in golangci config and update all protobuf field
access to use getter methods instead of direct field access.
Getter methods provide safer nil pointer handling and return
appropriate default values, following protobuf best practices.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
2025-05-30 15:29:32 -07:00
Fish-pro
039a4d87e2
Use http constants instead of string (#5908)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-09 12:29:49 +01:00
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07:00
Hu Shuai
e233f59ee8
Fix some typos in comments. (#4100)
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-09-01 09:10:45 +02:00
Miek Gieben
995179a6c6
presubmit: check import path ordering (#3636)
Add a test for this as well as it's annoying to point out in every code
review.
Fix all the import paths that are flagged by this new test.

Fixes: #3634

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-30 09:19:26 +00:00
Miek Gieben
725becd134
Stop importing testing in the main binary (#2479)
* Stop importing testing in the main binary

Stop importing "testing" into the main binary:

* test/helpers.go imported it; remote that and change function signature
* update all tests that use this

Signed-off-by: Miek Gieben <miek@miek.nl>

* Drop import testing from metrics plugin

Signed-off-by: Miek Gieben <miek@miek.nl>

* more fiddling

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-19 11:23:13 +00:00