mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 16:36:38 +00:00
lint: Fix virtcontainers unconvert
errors
Correct `unconvert` linter issues. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
@@ -637,7 +637,7 @@ func (h *hyper) processListOneContainer(podID, cID string, options ProcessListOp
|
||||
func (h *hyper) connectProxyRetry(scheme, address string) (conn net.Conn, err error) {
|
||||
attempt := 1
|
||||
|
||||
timeoutSecs := time.Duration(waitForProxyTimeoutSecs * time.Second)
|
||||
timeoutSecs := waitForProxyTimeoutSecs * time.Second
|
||||
|
||||
startTime := time.Now()
|
||||
lastLogTime := startTime
|
||||
|
@@ -131,7 +131,7 @@ func newHypervisor(hType HypervisorType) (hypervisor, error) {
|
||||
func makeNameID(namedType string, id string) string {
|
||||
nameID := fmt.Sprintf("%s-%s", namedType, id)
|
||||
if len(nameID) > maxDevIDSize {
|
||||
nameID = string(nameID[:maxDevIDSize])
|
||||
nameID = nameID[:maxDevIDSize]
|
||||
}
|
||||
|
||||
return nameID
|
||||
|
@@ -345,7 +345,7 @@ func (h *Hyperstart) WriteCtlMessage(conn net.Conn, m *DecodedMessage) error {
|
||||
return fmt.Errorf("message too long %d", length)
|
||||
}
|
||||
msg := make([]byte, length)
|
||||
binary.BigEndian.PutUint32(msg[:], uint32(m.Code))
|
||||
binary.BigEndian.PutUint32(msg[:], m.Code)
|
||||
binary.BigEndian.PutUint32(msg[CtlHdrLenOffset:], uint32(length))
|
||||
copy(msg[CtlHdrSize:], m.Message)
|
||||
|
||||
|
@@ -285,7 +285,7 @@ func (h *Hyperstart) SendIo(seq uint64, data []byte) {
|
||||
|
||||
h.logf("io: <-- writing %d bytes for seq %d\n", len(data), seq)
|
||||
|
||||
binary.BigEndian.PutUint64(header[:], uint64(seq))
|
||||
binary.BigEndian.PutUint64(header[:], seq)
|
||||
binary.BigEndian.PutUint32(header[8:], uint32(length))
|
||||
h.writeIo(header)
|
||||
|
||||
|
@@ -429,7 +429,7 @@ func (proto *ccProxyProtocol) handleCommand(ctx *clientCtx, cmd *api.Frame) *api
|
||||
|
||||
// cmd.Header.Opcode is guaranteed to be within the right bounds by
|
||||
// ReadFrame().
|
||||
handler := proto.cmdHandlers[FrameKey{cmd.Header.Type, int(cmd.Header.Opcode)}]
|
||||
handler := proto.cmdHandlers[FrameKey{cmd.Header.Type, cmd.Header.Opcode}]
|
||||
|
||||
handler(cmd.Payload, ctx.userData, &hr)
|
||||
if hr.err != nil {
|
||||
|
@@ -133,7 +133,7 @@ func (u UUID) String() string {
|
||||
clkSeqLow := u[9]
|
||||
buf := make([]byte, 8)
|
||||
copy(buf[2:], u[10:])
|
||||
node := uint64(binary.BigEndian.Uint64(buf))
|
||||
node := binary.BigEndian.Uint64(buf)
|
||||
|
||||
return fmt.Sprintf("%08x-%04x-%04x-%02x%02x-%012x",
|
||||
timeLow, timeMid, timeHi, clkSeqHi, clkSeqLow, node)
|
||||
|
Reference in New Issue
Block a user