mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-04 02:14:29 +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) {
|
func (h *hyper) connectProxyRetry(scheme, address string) (conn net.Conn, err error) {
|
||||||
attempt := 1
|
attempt := 1
|
||||||
|
|
||||||
timeoutSecs := time.Duration(waitForProxyTimeoutSecs * time.Second)
|
timeoutSecs := waitForProxyTimeoutSecs * time.Second
|
||||||
|
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
lastLogTime := startTime
|
lastLogTime := startTime
|
||||||
|
@@ -131,7 +131,7 @@ func newHypervisor(hType HypervisorType) (hypervisor, error) {
|
|||||||
func makeNameID(namedType string, id string) string {
|
func makeNameID(namedType string, id string) string {
|
||||||
nameID := fmt.Sprintf("%s-%s", namedType, id)
|
nameID := fmt.Sprintf("%s-%s", namedType, id)
|
||||||
if len(nameID) > maxDevIDSize {
|
if len(nameID) > maxDevIDSize {
|
||||||
nameID = string(nameID[:maxDevIDSize])
|
nameID = nameID[:maxDevIDSize]
|
||||||
}
|
}
|
||||||
|
|
||||||
return nameID
|
return nameID
|
||||||
|
@@ -345,7 +345,7 @@ func (h *Hyperstart) WriteCtlMessage(conn net.Conn, m *DecodedMessage) error {
|
|||||||
return fmt.Errorf("message too long %d", length)
|
return fmt.Errorf("message too long %d", length)
|
||||||
}
|
}
|
||||||
msg := make([]byte, 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))
|
binary.BigEndian.PutUint32(msg[CtlHdrLenOffset:], uint32(length))
|
||||||
copy(msg[CtlHdrSize:], m.Message)
|
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)
|
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))
|
binary.BigEndian.PutUint32(header[8:], uint32(length))
|
||||||
h.writeIo(header)
|
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
|
// cmd.Header.Opcode is guaranteed to be within the right bounds by
|
||||||
// ReadFrame().
|
// 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)
|
handler(cmd.Payload, ctx.userData, &hr)
|
||||||
if hr.err != nil {
|
if hr.err != nil {
|
||||||
|
@@ -133,7 +133,7 @@ func (u UUID) String() string {
|
|||||||
clkSeqLow := u[9]
|
clkSeqLow := u[9]
|
||||||
buf := make([]byte, 8)
|
buf := make([]byte, 8)
|
||||||
copy(buf[2:], u[10:])
|
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",
|
return fmt.Sprintf("%08x-%04x-%04x-%02x%02x-%012x",
|
||||||
timeLow, timeMid, timeHi, clkSeqHi, clkSeqLow, node)
|
timeLow, timeMid, timeHi, clkSeqHi, clkSeqLow, node)
|
||||||
|
Reference in New Issue
Block a user