ci(lint): setup golangci-lint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@ -19,9 +19,9 @@ import (
|
||||
"net"
|
||||
"syscall"
|
||||
|
||||
"github.com/containernetworking/plugins/pkg/ip"
|
||||
|
||||
"github.com/vishvananda/netlink"
|
||||
|
||||
"github.com/containernetworking/plugins/pkg/ip"
|
||||
)
|
||||
|
||||
const latencyInMillis = 25
|
||||
@ -34,7 +34,6 @@ func CreateIfb(ifbDeviceName string, mtu int) error {
|
||||
MTU: mtu,
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("adding link: %s", err)
|
||||
}
|
||||
@ -147,10 +146,6 @@ func createTBF(rateInBits, burstInBits uint64, linkIndex int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func tick2Time(tick uint32) uint32 {
|
||||
return uint32(float64(tick) / float64(netlink.TickInUsec()))
|
||||
}
|
||||
|
||||
func time2Tick(time uint32) uint32 {
|
||||
return uint32(float64(time) * float64(netlink.TickInUsec()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user