jzelinskie / geddit

golang reddit api wrapper
BSD 3-Clause "New" or "Revised" License
164 stars 58 forks source link

Comment.go should use float in string() instead of decimal #19

Closed Sefriol closed 6 years ago

Sefriol commented 8 years ago

Small thing, but lines 38-40

func (c Comment) String() string {
    return fmt.Sprintf("%s (%d/%d): %s", c.Author, c.UpVotes, c.DownVotes, c.Body)
}

Probably should be like this:

func (c Comment) String() string {
    return fmt.Sprintf("%s (%.0f/%.0f): %s", c.Author, c.UpVotes, c.DownVotes, c.Body)
}

Atm it prints out float64=number, which is kind hard to read :)

ghost commented 6 years ago

Fixed in pull request #41