Closed Khabi closed 5 years ago
This gives you a nice human readable representation of the PersonaState.
fmt.Fprintf(w, "%s is %s\n", user_info.PersonaName, user_info.PersonaState)
would print out
"<user> is Online"
instead of the current approach that would print
"<user> is 1"
This also lets you do things like:
if user_info.PersonState.String() == "Online" {}
Why not simply do something like
switch p { case Offline: return "Offline" ... }
?
This gives you a nice human readable representation of the PersonaState.
would print out
instead of the current approach that would print
This also lets you do things like: