From 3b55742b4e97275c1bc99c4a40b4c9daa2220431 Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Wed, 28 Jul 2021 16:42:25 +0200 Subject: [PATCH] Add missing PresenceStatus type --- userapi/types/presence_string.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 userapi/types/presence_string.go diff --git a/userapi/types/presence_string.go b/userapi/types/presence_string.go new file mode 100644 index 000000000..a80302bab --- /dev/null +++ b/userapi/types/presence_string.go @@ -0,0 +1,27 @@ +// Code generated by "stringer -type=PresenceStatus -output=presence_string.go -linecomment"; DO NOT EDIT. + +package types + +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[Unknown - -1] + _ = x[Online-0] + _ = x[Offline-1] + _ = x[Unavailable-2] +} + +const _PresenceStatus_name = "unknownonlineofflineunavailable" + +var _PresenceStatus_index = [...]uint8{0, 7, 13, 20, 31} + +func (i PresenceStatus) String() string { + i -= -1 + if i < 0 || i >= PresenceStatus(len(_PresenceStatus_index)-1) { + return "PresenceStatus(" + strconv.FormatInt(int64(i+-1), 10) + ")" + } + return _PresenceStatus_name[_PresenceStatus_index[i]:_PresenceStatus_index[i+1]] +}