Tiny nitpick: It’s unidiomatic to put the get prefix in function//method names, like getPathValues. See Effective Go and the Go standard library where it’s only used for names based on their C counterpart (getenv).
Even then I would rather call the handler serveDocument instead of getDocument. Of course there are counter examples, but I haven’t seen a convincing one yet.
Possibly relevant, my blog post on Lucene entitled “Lucene: The Good Parts”.
https://blog.parse.ly/lucene/
Tiny nitpick: It’s unidiomatic to put the get prefix in function//method names, like getPathValues. See Effective Go and the Go standard library where it’s only used for names based on their C counterpart (getenv).
I would say that in some of the places it’s warranted as it makes it clear that the method/function is called from an HTTP GET request.
Even then I would rather call the handler
serveDocument
instead ofgetDocument
. Of course there are counter examples, but I haven’t seen a convincing one yet.In the case of getPathValues it’s not related to an HTTP GET request though.
Yes, that’s why I said “in some places”.