Skip to content

Do not shorten output comments that are in Godoc examples  #66

@StevenACoffman

Description

@StevenACoffman

An example of a example_test.go file that golines --shorten-comments --base-formatter=gofumpt -w . currently breaks is: https://go.dev/play/p/zjwVoZGcobT

As with typical tests, examples are functions that reside in a package’s _test.go files. Unlike normal test functions, though, example functions take no arguments and begin with the word Example instead of Test. If a comment begins with // Output: then it and any commented lines immediately following it should not be shortened by --shorten-comments .

At least, I think there's no valid way to shorten output lines!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions