Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
neogopher committed Dec 5, 2024
1 parent d59e7d4 commit 296c678
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkg/controllers/resources/nodes/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ func (s *nodeSyncer) ModifyController(ctx *synccontext.RegisterContext, bld *bui
}

// only used when scheduler is enabled
func enqueueNonVclusterPod(old, new client.Object, q workqueue.RateLimitingInterface) {
pod, ok := new.(*corev1.Pod)
func enqueueNonVclusterPod(old, newObj client.Object, q workqueue.RateLimitingInterface) {
pod, ok := newObj.(*corev1.Pod)
if !ok {
klog.Errorf("invalid type passed to pod handler: %T", new)
klog.Errorf("invalid type passed to pod handler: %T", newObj)
return
}
// skip if node name missing
Expand Down
4 changes: 2 additions & 2 deletions pkg/helm/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func ParseInLocation(layout, value string, loc *time.Location) (Time, error) {
return Time{Time: t}, err
}

func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time {
return Time{Time: time.Date(year, month, day, hour, min, sec, nsec, loc)}
func Date(year int, month time.Month, day, hour, minute, sec, nsec int, loc *time.Location) Time {
return Time{Time: time.Date(year, month, day, hour, minute, sec, nsec, loc)}
}

func Unix(sec int64, nsec int64) Time { return Time{Time: time.Unix(sec, nsec)} }
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/encoding/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ func Convert(from runtime.Object, to runtime.Object) error {
}

// ConvertList converts the objects from the from list and puts them into the to list
func ConvertList(fromList runtime.Object, toList runtime.Object, new rest.Storage) error {
func ConvertList(fromList runtime.Object, toList runtime.Object, newObj rest.Storage) error {
list, err := meta.ExtractList(fromList)
if err != nil {
return err
}

newItems := []runtime.Object{}
for _, item := range list {
newItem := new.New()
newItem := newObj.New()
err = Convert(item, newItem)
if err != nil {
return err
Expand Down

0 comments on commit 296c678

Please sign in to comment.