wechaty/go-wechaty

View on GitHub
wechaty-puppet/schemas/payloadtype_string.go

Summary

Maintainability
A
1 hr
Test Coverage
F
0%
// Code generated by "stringer -type=PayloadType"; DO NOT EDIT.

package schemas

import "strconv"

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{}
    _ = x[PayloadTypeUnknown-0]
    _ = x[PayloadTypeMessage-1]
    _ = x[PayloadTypeContact-2]
    _ = x[PayloadTypeRoom-3]
    _ = x[PayloadTypeRoomMember-4]
    _ = x[PayloadTypeFriendship-5]
}

const _PayloadType_name = "PayloadTypeUnknownPayloadTypeMessagePayloadTypeContactPayloadTypeRoomPayloadTypeRoomMemberPayloadTypeFriendship"

var _PayloadType_index = [...]uint8{0, 18, 36, 54, 69, 90, 111}

func (i PayloadType) String() string {
    if i < 0 || i >= PayloadType(len(_PayloadType_index)-1) {
        return "PayloadType(" + strconv.FormatInt(int64(i), 10) + ")"
    }
    return _PayloadType_name[_PayloadType_index[i]:_PayloadType_index[i+1]]
}