I work for a company who are very risk averse to developers using any packages that are not invented from the ground up in-house. As a result it’s virtually impossible to have access to and to be able to use any of the many really useful community developed packages i.e. gorilla, gin etc
I’m currently exploring the possibilities and pitfalls of developing HTTP restful services solely using the standard library and one of the first things that I’ve come up against is lack of standard library out of the box ability to extract an Id from a request URL.Path for a PUT, the Id which effectively represents the item being updated in the PUT request.
This is pretty basic stuff which would be trivial with gorilla but since I’m unable to use that I’ve come up my own struct + method that intends to be reusable in whatever package it gets declared in / whatever other struct it eventually ends up being attached to in this example:
I’m seeking feedback from you useful people here to tell me if this looks ok, looks awful or is just an altogether terrible idea etc.