summaryrefslogtreecommitdiff
path: root/srv/chat/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'srv/chat/util.go')
-rw-r--r--srv/chat/util.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/srv/chat/util.go b/srv/chat/util.go
deleted file mode 100644
index 05f4830..0000000
--- a/srv/chat/util.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package chat
-
-import (
- "strconv"
- "strings"
-
- "github.com/mediocregopher/radix/v4"
-)
-
-func parseStreamEntryID(str string) (radix.StreamEntryID, error) {
-
- split := strings.SplitN(str, "-", 2)
- if len(split) != 2 {
- return radix.StreamEntryID{}, errInvalidMessageID
- }
-
- time, err := strconv.ParseUint(split[0], 10, 64)
- if err != nil {
- return radix.StreamEntryID{}, errInvalidMessageID
- }
-
- seq, err := strconv.ParseUint(split[1], 10, 64)
- if err != nil {
- return radix.StreamEntryID{}, errInvalidMessageID
- }
-
- return radix.StreamEntryID{Time: time, Seq: seq}, nil
-}