njones / socketio

A Modern SocketIO library for go
MIT License
60 stars 9 forks source link

Update error handling for errors.Struct Is method #62

Closed njones closed 1 year ago

njones commented 1 year ago

Added StringF Is method error matching, to the internal errors.Struct object This fixes an issue in server.v4.runback.go where the wrong error message was being sent back, because the Is method was broken for StringF errors.

Uses "%valid", "Inv" to produce "Invalid" with a capital letter for the error message, which is marked as incorrect by the go linter. The "%v" with "alid" produces a valid word while providing a valid formatting option to provide a string.