diff options
Diffstat (limited to 'xmpp/component.go')
-rw-r--r-- | xmpp/component.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xmpp/component.go b/xmpp/component.go index 1749100..f5143ea 100644 --- a/xmpp/component.go +++ b/xmpp/component.go @@ -23,16 +23,17 @@ var db *persistence.SessionsYamlDB var sessionLock sync.Mutex const ( - B uint64 = 1 - KB = B << 10 - MB = KB << 10 - GB = MB << 10 - TB = GB << 10 - PB = TB << 10 - EB = PB << 10 + B uint64 = 1 + KB = B << 10 + MB = KB << 10 + GB = MB << 10 + TB = GB << 10 + PB = TB << 10 + EB = PB << 10 maxUint64 uint64 = (1 << 64) - 1 ) + var sizeRegex = regexp.MustCompile("\\A([0-9]+) ?([KMGTPE]?B?)\\z") // NewComponent starts a new component and wraps it in |