Skip to content

Improve query string parsing and error handling in basic_server.go #31

Description

@a-temlyakov

Currently is a bit ad-hoc... there is the parse_input method (https://github.com/Akavall/GoGamesProject/blob/master/basic_server.go#L215), but it's currently only used by the take_zombie_dice_turn method.

I am certain there are libraries out there we can use, but I had rather do it ourselves as a learning exercise. Just need to clean up (abstract away) the parsing a bit and all the error handling that results from it.

My general idea right now would be to just move the parsing to method(s) like parse_input and then when error handling instead of checking at each parameter collect the errors and check them all in one go after all parsing is done. Can get more ideas from this: https://blog.golang.org/errors-are-values

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions