diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2019-03-08 15:58:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-08 15:58:07 -0800 |
commit | 70339c433026952a4bb4b930286318cf41e8bab9 (patch) | |
tree | 661dc4602e03d07a3bcff0f72aad06435570ec32 | |
parent | 35223403c1b9cb3c12aaf485f964a9905d694745 (diff) | |
parent | 9d7020b680267fd9f7585f7e6b7c322ae98f5201 (diff) |
Merge pull request #123 from CodeLingoBot/rewrite
Fix function comments based on best practices from Effective Go
-rw-r--r-- | src/termui/drawille-go/drawille.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/termui/drawille-go/drawille.go b/src/termui/drawille-go/drawille.go index 601d1dc..f9954d0 100644 --- a/src/termui/drawille-go/drawille.go +++ b/src/termui/drawille-go/drawille.go @@ -143,17 +143,17 @@ func (c Canvas) Get(x, y int) bool { return (char & dot_index) != 0 } -// Get character at the given screen coordinates +// GetScreenCharacter gets character at the given screen coordinates func (c Canvas) GetScreenCharacter(x, y int) rune { return rune(c.chars[y][x] + braille_char_offset) } -// Get character for the given pixel +// GetCharacter gets character for the given pixel func (c Canvas) GetCharacter(x, y int) rune { return c.GetScreenCharacter(x/4, y/4) } -// Retrieve the rows from a given view +// Rows retrieves the rows from a given view func (c Canvas) Rows(minX, minY, maxX, maxY int) []string { minrow, maxrow := minY/4, (maxY)/4 mincol, maxcol := minX/2, (maxX)/2 @@ -170,7 +170,7 @@ func (c Canvas) Rows(minX, minY, maxX, maxY int) []string { return ret } -// Retrieve a string representation of the frame at the given parameters +// Frame retrieves a string representation of the frame at the given parameters func (c Canvas) Frame(minX, minY, maxX, maxY int) string { var ret string for _, row := range c.Rows(minX, minY, maxX, maxY) { |