Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: doc: create *NIX manual pages for Go standard library functions #50461

Closed
takusuman opened this issue Jan 6, 2022 · 5 comments
Closed

Comments

@takusuman
Copy link

takusuman commented Jan 6, 2022

Recently, I started to play around with Go, and one thing that I've really missed were manual pages for standard library functions (such as, for example fmt.Printf()), like there are in another languages (a.k.a /usr/share/man/man3).
This is an example of what I mean:
image

Sometimes I run into a syntax error and/or misusing the function and I have to access the official documentation on the web just to read about the function itself, what is a setback to me, while I could just type man 3 <function name here> and see what it does and how to use it, like it would be in C or even in Perl (if I recall correctly, Red Hat Linux had manpages packaged for Perl library functions).

If you guys decide to start making manual pages for Go standard library, I offer to help in writing them. It would be a nice opportunity to practice my "documentation writing" skills and to learn the language in a deeper level.

I don't know if something like what I'm proposing already exists by community's hands, so please don't beat me up for asking this, just say if it exists or not.
May this is a duplicate from #101, but it still pertinent to be talked about since it hasn't been fixed/implemented yet.

Thanks for the attention.

@gopherbot gopherbot added this to the Proposal milestone Jan 6, 2022
@smasher164
Copy link
Member

Note that documentation for a specific function is still available on the command line via

$ go doc <package>.<function>

For example

$ go doc strings.Split
package strings // import "strings"

func Split(s, sep string) []string
    Split slices s into all substrings separated by sep and returns a slice of
    the substrings between those separators.

    If s does not contain sep and sep is not empty, Split returns a slice of
    length 1 whose only element is s.

    If sep is empty, Split splits after each UTF-8 sequence. If both s and sep
    are empty, Split returns an empty slice.

    It is equivalent to SplitN with a count of -1.

@takusuman
Copy link
Author

takusuman commented Jan 6, 2022

Note that documentation for a specific function is still available on the command line via

$ go doc <package>.<function>

Thank you man.
I guess I'll just close this issue for now, since it's almost solved in the sense of accessing documentation via command line.
By the way, it could still be more detailed, like manpages, with some syntax example (and, in case of fmt.Printf(), with the table of verbs).

@takusuman
Copy link
Author

By the way, it could still be more detailed, like manpages, with some syntax example (and, in case of fmt.Printf(), with the table of verbs).

So, although it's solved for my used, I'm reopening so more people will see it.

@takusuman takusuman reopened this Jan 6, 2022
@mengzhuo
Copy link
Contributor

mengzhuo commented Jan 7, 2022

FYI #101

IMO this proposal will be declined.

@seankhliao
Copy link
Member

I think this can just be closed as a dup.
There's nothing here that would change the decision made for #101

@golang golang locked and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants