Closed jacobstr closed 7 years ago
See also: #40 and #43
Cheers for the quick review. Stylistic nits were quite sensible. Option type was also made private.
There's a slight caveat on what to do if the Content-Type is empty and cannot be determined. Right now you could make it work by passing []string{""}
.
[]string{} - Match any content type (backwards compatible, default)
[]string{"","application/json"} - Match unknown content types and application/json.
That's kind of incidental to how the comparsion works given the value coming out of Header().Get("Content-Type")
.
🐈 thanks!!
Along for the ride are functional options to stop the combinatorial growth of option-specific factories.