Re: [go-nuts] Purpose of pattern in muxEntry

2020-12-15 Thread Amit Saha
> On 16 Dec 2020, at 5:49 am, jake...@gmail.com wrote: > > I have no special knowledge of the code, but it looks like the reason is so > that ServeMux.es , which is a []muxEntry, can be > searched. See the latter half of `func (mux *ServeMux) match() >

[go-nuts] Purpose of pattern in muxEntry

2020-12-14 Thread Amit Saha
Hi all, the ServerMux struct is currently defined as: type ServeMux struct { // other fields m map[string]muxEntry } The muxEntry is then defined as: type muxEntry struct { h Handler pattern string } Is there any reason for also storing the pattern in the muxEntry since it *see