Skip to content

Godoc and blank lines #592

@gopherbot

Description

@gopherbot

by dean.prichard:

What steps will reproduce the problem?
godoc sort
or take a look at http://golang.org/pkg/sort/

comments in type Interface are misformatted.

doc comments are missing for:
func SortFloats
func SortStrings
func FloatsAreSorted
func StringsAreSorted


What is the expected output? What do you see instead?

expected:

type Interface interface {
    // Len is the number of elements in the collection.
    Len() int
    // Less returns whether the element with index i should sort
    // before the element with index j.
    Less(i, j int) bool
    // Swap swaps the elements with indexes i and j.
    Swap(i, j int)
}

func SortFloats(a []float)
SortFloats sorts an array of floats in increasing order.

func SortStrings(a []string)
SortStrings sorts an array of strings in increasing order. 

func FloatsAreSorted(a []float) bool
FloatsAreSorted tests whether an array of floats is sorted in increasing
order. 

func StringsAreSorted(a []string) bool
StringsAreSorted tests whether an array of strings is sorted in increasing
order. 
 
observed:

type Interface interface {
    // Len is the number of elements in the collection.
    Len() int // Less returns whether the element with index i should sort
    // before the element with index j.
    Less(i, j int) bool // Swap swaps the elements with indexes i and j.
    Swap(i, j int)
}

func SortFloats(a []float)

func SortStrings(a []string) 

func FloatsAreSorted(a []float) bool

func StringsAreSorted(a []string) bool

What is your $GOOS?  $GOARCH?
GOARCH=amd64
GOOS=darwin


Which revision are you using?  (hg identify)
0faff22ec34d tip

Please provide any additional information below.
If blank lines are added before the comments then things
are parsed correctly. see attached file.

Attachments:

  1. sort.diff (1264 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions