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:
James O. D. Hunt
2018-03-19 15:34:16 +00:00
parent bd8b585c79
commit c4e85905db
6 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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 {

View File

@@ -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)