The main issue is that most package functions are not actually listed under 
"Functions". 

For example, I wanted to lookup StripPrefix in the http package. I could 
not find it in the package documentation function index. It was not there. 

So I looked under Types (maybe I did remember it incorrectly?). It wasn't 
listed there either. 

But I was quite sure it existed. 

I eventually found it using the Jump-To bar.

So, turns out, the function is actually listed under the type "Handler", 
probably because it implements that interface. 

Well. Cool.  

That's helpful indeed if you are interested to see which types implement 
"Handler" (even though the index does not state that "Handler" is an 
interface so you first wonder 1 minute why "Handler" has types hanging 
under it instead of methods, but ok).

However, the *primary* use of the index is to *quickly* find that function 
you're looking for.  That's what indexes are for.    Turns out, it just 
only lists like half of the functions - if you're lucky.

Another example is the x/net/html package. 

The "Parse" function is arguably the most important function of the whole 
package. Well - you can only find Parse *under* the Node type, which is by 
default collapsed.

Another fun example is the documentation for type http.FileSystem. It 
contains this text:

"See the FileServer function to convert a FileSystem to a Handler." 

Awesome! Let's look up that FileServer function in the index.

Well. It's not there.

No. 

You are expected to be so smart to realise that FileServer of course 
implements the Handler interface and is therefore only listed under the 
collapsed Handler type. Maddening.

Proposal: just list all functions in the index please.

NOTE: I admire Go & Go.dev. My exaggerative style is just used to 
illustrate my point.

NOTE: My apologies if this is not the place for go.dev feedback. Please 
redirect me.

NOTE: I know that the index in the old package docs also has this 
structure. It has somewhat the same issue, but at least you could scroll 
through it a scan for function  names.







 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/15cb6bbd-83fc-44f7-a5fc-a922b7112461n%40googlegroups.com.

Reply via email to