Tests for Component and code style fixes (#129)

* Tests for Component and code style fixes
This commit is contained in:
remicorniere
2019-11-28 16:15:15 +00:00
committed by Jérôme Sautret
parent 7d89353156
commit 1822089db6
21 changed files with 612 additions and 74 deletions
+6
View File
@@ -1,5 +1,7 @@
package stanza
import "strings"
type StanzaType string
// RFC 6120: part of A.5 Client Namespace and A.6 Server Namespace
@@ -23,3 +25,7 @@ const (
PresenceTypeUnsubscribe StanzaType = "unsubscribe"
PresenceTypeUnsubscribed StanzaType = "unsubscribed"
)
func (s StanzaType) IsEmpty() bool {
return len(strings.TrimSpace(string(s))) == 0
}