How to search standard libarary?

122 views
Skip to first unread message

jake...@gmail.com

unread,
Mar 16, 2021, 10:09:25 AM3/16/21
to golang-nuts

For years now, when I needed to casually lookup a standard library function I would use the search on the website. Like https://golang.org/search?q=Rename. This no longer works, and the search box on the Go website and "Package Documentation" page is now gone.

Has this moved somewhere else? How do I do a quick web-browser based search of the standard libraries?

I know I can use 'go doc', but that is not web based, and AFAICT, only works if you know the exact package the function is in.

Any suggestions?

Carla Pfaff

unread,
Mar 16, 2021, 11:28:06 AM3/16/21
to golang-nuts
On Tuesday, 16 March 2021 at 15:09:25 UTC+1 jake...@gmail.com wrote:
Any suggestions?

Eli Bendersky

unread,
Mar 16, 2021, 11:31:51 AM3/16/21
to jake...@gmail.com, golang-nuts
I really like devdocs.io for this

You type "Go" and TAB, and then it will only autocomplete in the Go stdlib.



--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/599eba82-5447-44d7-b151-2e513065ede6n%40googlegroups.com.

jake...@gmail.com

unread,
Mar 16, 2021, 11:49:44 AM3/16/21
to golang-nuts
While that may be useful in its own way, it is not useful for what UI asked for. It searches the  library sources, not the documentation.

jake...@gmail.com

unread,
Mar 16, 2021, 11:53:01 AM3/16/21
to golang-nuts
On Tuesday, March 16, 2021 at 11:31:51 AM UTC-4 eli...@gmail.com wrote:
I really like devdocs.io for this

You type "Go" and TAB, and then it will only autocomplete in the Go stdlib.

Thanks, that seems to do what I want.

It seems like a real oversight that there is no search on the official go documentation though. It seems like it would be really helpful, especially to beginners. I would love to hear from someone involved why the go team decided to remove this feature from the official Go website.

Carla Pfaff

unread,
Mar 16, 2021, 11:58:01 AM3/16/21
to golang-nuts
On Tuesday, 16 March 2021 at 16:53:01 UTC+1 jake...@gmail.com wrote:
 I would love to hear from someone involved why the go team decided to remove this feature from the official Go website. 

The reasons for removing the search are documented in the accompanying issue: https://github.com/golang/go/issues/44357 

Jan Mercl

unread,
Mar 16, 2021, 11:59:31 AM3/16/21
to jake...@gmail.com, golang-nuts
On Tue, Mar 16, 2021 at 4:53 PM jake...@gmail.com <jake...@gmail.com> wrote:

> It seems like a real oversight that there is no search on the official go documentation though. It seems like it would be really helpful, especially to beginners. I would love to hear from someone involved why the go team decided to remove this feature from the official Go website.

Entering `rename site:golang.org/pkg` in Chrome seems to work well, for example.

(But I'm not using this kind of search so there might be some issues
I'm not aware of.)

colourdelete

unread,
Mar 16, 2021, 12:58:14 PM3/16/21
to golang-nuts
I usually search on pkg.go.dev: https://pkg.go.dev/std

This page lists the standard libraries, and I Google with site:https://pkg.go.dev/std Rename.

jake...@gmail.com

unread,
Mar 17, 2021, 11:59:00 AM3/17/21
to golang-nuts
On Tuesday, March 16, 2021 at 11:59:31 AM UTC-4 Jan Mercl wrote:
Entering `rename site:golang.org/pkg` in Chrome seems to work well, for example.

(But I'm not using this kind of search so there might be some issues
I'm not aware of.)

I'm unclear what you are suggesting. How does this search?

Jan Mercl

unread,
Mar 17, 2021, 12:08:44 PM3/17/21
to jake...@gmail.com, golang-nuts
Entering (sans the backquotes) `rename site:golang.org/pkg` into the
address bar of the Chrome browser and pressing <enter> produces a page
of results for rename in the documentation of the Go standard library
that can substitute the results of the now removed
https://golang.org/search?q=Rename facility.

Example: https://www.google.com/search?q=rename+site%3Agolang.org%2Fpkg
Reply all
Reply to author
Forward
0 new messages