core/lint: upgrade golangci-lint, replace interface{} with any (#5099)

* core/lint: upgrade golangci-lint, replace interface{} with any

* regen proto
This commit is contained in:
Caleb Doxsey 2024-05-02 14:33:52 -06:00 committed by GitHub
parent 614048ae9c
commit 1a5b8b606f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
135 changed files with 341 additions and 340 deletions

View file

@ -25,12 +25,12 @@ func (h bundleHeap) Less(i, j int) bool {
func (h bundleHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] }
func (h *bundleHeap) Push(x interface{}) {
func (h *bundleHeap) Push(x any) {
item := x.(bundle)
*h = append(*h, item)
}
func (h *bundleHeap) Pop() interface{} {
func (h *bundleHeap) Pop() any {
old := *h
n := len(old)
x := old[n-1]

View file

@ -49,7 +49,7 @@ func Run(ctx context.Context, opts ...Option) error {
func (c *service) watchUpdates(ctx context.Context) error {
return c.config.api.Watch(ctx,
connect_mux.WithOnConnected(func(ctx context.Context) {
connect_mux.WithOnConnected(func(_ context.Context) {
c.triggerFullUpdate(true)
}),
connect_mux.WithOnDisconnected(func(_ context.Context) {

View file

@ -217,10 +217,10 @@ func (c *service) syncBundleToDatabroker(ctx context.Context, key string, src io
err = databroker.NewReconciler(
fmt.Sprintf("bundle-%s", key),
c.config.databrokerClient,
func(ctx context.Context) (databroker.RecordSetBundle, error) {
func(_ context.Context) (databroker.RecordSetBundle, error) {
return databrokerRecords, nil
},
func(ctx context.Context) (databroker.RecordSetBundle, error) {
func(_ context.Context) (databroker.RecordSetBundle, error) {
return bundleRecords, nil
},
func(_ []*databroker.Record) {},