You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: const.go
    path of file: ./repos/sealer/vendor/github.com/libp2p/go-yamux/v2
    
    the code of the file until where you have to start completion: package yamux

import (
	"encoding/binary"
	"fmt"
)

type Error struct {
	msg                string
	timeout, tempora
    
func encode(msgType uint8, flags uint16, streamID uint32, length uint32) header {
	var h header
	h[0] = protoVersion
	h[1] = msgType
	binary.BigEndian.PutUint16(h[2:4], flags)
	binary.BigEndian.PutUint32(h[4:8], streamID)
	binary.BigEndian.PutUint32(h[8:12], length)
	return h
}