Skip to content

Instantly share code, notes, and snippets.

View jktomer's full-sized avatar

Jonathan Klabunde Tomer jktomer

  • WhatsApp
  • San Jose, CA
View GitHub Profile
src/kubernetes/pkg/kubelet/stats/cri_stats_provider.go:665:27: integer division cast to float found "float64(time.Second / time.Nanosecond)"
src/kubernetes/pkg/controller/podautoscaler/horizontal_test.go:2679:21: integer division cast to float found "float64(totalRequestedCPUOfAllPods / int32(totalUsedCPUOfAllPods))"
src/kubernetes/pkg/controller/podautoscaler/legacy_horizontal_test.go:986:21: integer division cast to float found "float64(totalRequestedCPUOfAllPods / int32(totalUsedCPUOfAllPods))"
src/kubernetes/pkg/controller/podautoscaler/legacy_replica_calculator_test.go:612:21: integer division cast to float found "float64(totalRequestedCPUOfAllPods / int32(totalUsedCPUOfAllPods))"
src/kubernetes/pkg/controller/podautoscaler/replica_calculator_test.go:1261:21: integer division cast to float found "float64(totalRequestedCPUOfAllPods / int32(totalUsedCPUOfAllPods))"
@jktomer
jktomer / divcheck.go
Created February 5, 2020 18:54
strawperson lint check for float constructor from integer divisions.
package divcheck
import (
"bytes"
"go/ast"
"go/printer"
"go/token"
"go/types"
"golang.org/x/tools/go/analysis"
@jktomer
jktomer / gist:0270c69e17b0ba714e0257f5cc899ed5
Last active February 21, 2019 22:30
syslog from RPi network init failure with no mouse
Feb 17 09:52:02 cobweb fake-hwclock[92]: Sun 17 Feb 2019 09:22:14 AM UTC
Feb 17 09:52:02 cobweb systemd[1]: Starting File System Check on Root Device...
Feb 17 09:52:02 cobweb systemd[1]: Condition check resulted in FUSE Control File System being skipped.
Feb 17 09:52:02 cobweb systemd[1]: Starting Apply Kernel Variables...
Feb 17 09:52:02 cobweb systemd[1]: Mounting Kernel Configuration File System...
Feb 17 09:52:02 cobweb systemd[1]: Started File System Check Daemon to report status.
Feb 17 09:52:02 cobweb systemd[1]: Started Apply Kernel Variables.
Feb 17 09:52:02 cobweb systemd[1]: Mounted Kernel Configuration File System.
Feb 17 09:52:02 cobweb systemd[1]: Started udev Coldplug all Devices.
Feb 17 09:52:02 cobweb systemd[1]: Starting Helper to synchronize boot up for ifupdown...