Skip to content

go/doc: drop //go:* comments from extracted docs #37974

@rsc

Description

@rsc

Today we write things like:

//go:noinline

// F does whatever it does.
func F()

instead of the more natural:

// F does whatever it does.
//go:noinline
func F()

because the latter produces:

$ go doc F

func F()
    F does whatever it does. go:noinline

Now that we have the //go: convention, let's fix go/doc to leave them out automatically,
and then we can write things the more natural way without cluttering docs.

I'm happy to do the work.

/cc @griesemer

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions