good morning!!!!

Skip to content
Snippets Groups Projects
opcode_string.go 897 B
Newer Older
Anmol Sethi's avatar
Anmol Sethi committed
// Code generated by "stringer -type=opcode"; DO NOT EDIT.
Anmol Sethi's avatar
Anmol Sethi committed

package websocket
Anmol Sethi's avatar
Anmol Sethi committed

import "strconv"

Anmol Sethi's avatar
Anmol Sethi committed
func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
Anmol Sethi's avatar
Anmol Sethi committed
	_ = x[opContinuation-0]
	_ = x[opText-1]
	_ = x[opBinary-2]
Anmol Sethi's avatar
Anmol Sethi committed
	_ = x[opClose-8]
	_ = x[opPing-9]
	_ = x[opPong-10]
Anmol Sethi's avatar
Anmol Sethi committed
const (
Anmol Sethi's avatar
Anmol Sethi committed
	_opcode_name_0 = "opContinuationopTextopBinary"
	_opcode_name_1 = "opCloseopPingopPong"
Anmol Sethi's avatar
Anmol Sethi committed
)

var (
Anmol Sethi's avatar
Anmol Sethi committed
	_opcode_index_0 = [...]uint8{0, 14, 20, 28}
	_opcode_index_1 = [...]uint8{0, 7, 13, 19}
Anmol Sethi's avatar
Anmol Sethi committed
)

Anmol Sethi's avatar
Anmol Sethi committed
func (i opcode) String() string {
Anmol Sethi's avatar
Anmol Sethi committed
	switch {
	case 0 <= i && i <= 2:
Anmol Sethi's avatar
Anmol Sethi committed
		return _opcode_name_0[_opcode_index_0[i]:_opcode_index_0[i+1]]
Anmol Sethi's avatar
Anmol Sethi committed
	case 8 <= i && i <= 10:
		i -= 8
Anmol Sethi's avatar
Anmol Sethi committed
		return _opcode_name_1[_opcode_index_1[i]:_opcode_index_1[i+1]]
Anmol Sethi's avatar
Anmol Sethi committed
	default:
Anmol Sethi's avatar
Anmol Sethi committed
		return "opcode(" + strconv.FormatInt(int64(i), 10) + ")"
Anmol Sethi's avatar
Anmol Sethi committed
	}
}