examples: Add chat example that also doesn't work properly yet

This commit is contained in:
2025-01-27 22:36:52 -05:00
parent 72df1e8d11
commit 54022e5541
6 changed files with 722 additions and 0 deletions

11
examples/chat/error.go Normal file
View File

@@ -0,0 +1,11 @@
package chat
import "fmt"
func (msg *MessageError) Error() string {
if description, ok := msg.Description.Get(); ok {
return fmt.Sprintf("other party sent error: %d %s", msg.Error, description)
} else {
return fmt.Sprintf("other party sent error: %d", msg.Code)
}
}