diff --git a/_example/dashboard.go b/_example/dashboard.go index b59c325..bd51c27 100644 --- a/_example/dashboard.go +++ b/_example/dashboard.go @@ -30,7 +30,7 @@ func main() { } }) - strs := []string{"[0] gizak/termui", "[1] editbox.go", "[2] iterrupt.go", "[3] keyboard.go", "[4] output.go", "[5] random_out.go", "[6] dashboard.go", "[7] nsf/termbox-go"} + strs := []string{"[0] gizak/termui", "[1] editbox.go", "[2] interrupt.go", "[3] keyboard.go", "[4] output.go", "[5] random_out.go", "[6] dashboard.go", "[7] nsf/termbox-go"} list := ui.NewList() list.Items = strs list.ItemFgColor = ui.ColorYellow diff --git a/_example/theme.go b/_example/theme.go index f06b3d0..f77a6d7 100644 --- a/_example/theme.go +++ b/_example/theme.go @@ -25,7 +25,7 @@ func main() { p.Width = 50 p.BorderLabel = "Text Box" - strs := []string{"[0] gizak/termui", "[1] editbox.go", "[2] iterrupt.go", "[3] keyboard.go", "[4] output.go", "[5] random_out.go", "[6] dashboard.go", "[7] nsf/termbox-go"} + strs := []string{"[0] gizak/termui", "[1] editbox.go", "[2] interrupt.go", "[3] keyboard.go", "[4] output.go", "[5] random_out.go", "[6] dashboard.go", "[7] nsf/termbox-go"} list := ui.NewList() list.Items = strs list.BorderLabel = "List" diff --git a/grid.go b/grid.go index a950232..851489d 100644 --- a/grid.go +++ b/grid.go @@ -48,7 +48,7 @@ func (r *Row) assignWidth(w int) { accW := 0 // acc span and offset calcW := make([]int, len(r.Cols)) // calculated width - calcOftX := make([]int, len(r.Cols)) // computated start position of x + calcOftX := make([]int, len(r.Cols)) // computed start position of x for i, c := range r.Cols { accW += c.Span + c.Offset @@ -266,7 +266,7 @@ func (g *Grid) Align() { } } -// Buffer implments Bufferer interface. +// Buffer implements Bufferer interface. func (g Grid) Buffer() Buffer { buf := NewBuffer() diff --git a/linechart.go b/linechart.go index f7eea28..84e7e28 100644 --- a/linechart.go +++ b/linechart.go @@ -35,7 +35,7 @@ var braillePatterns = map[[2]int]rune{ var lSingleBraille = [4]rune{'\u2840', '⠄', '⠂', '⠁'} var rSingleBraille = [4]rune{'\u2880', '⠠', '⠐', '⠈'} -// LineChart has two modes: braille(default) and dot. Using braille gives 2x capicity as dot mode, +// LineChart has two modes: braille(default) and dot. Using braille gives 2x capacity as dot mode, // because one braille char can represent two data points. /* lc := termui.NewLineChart() @@ -87,7 +87,7 @@ func NewLineChart() *LineChart { } // one cell contains two data points -// so the capicity is 2x as dot-mode +// so the capacity is 2x as dot-mode func (lc *LineChart) renderBraille() Buffer { buf := NewBuffer() diff --git a/list.go b/list.go index ea6635e..5a59215 100644 --- a/list.go +++ b/list.go @@ -14,7 +14,7 @@ import "strings" strs := []string{ "[0] github.com/gizak/termui", "[1] editbox.go", - "[2] iterrupt.go", + "[2] interrupt.go", "[3] keyboard.go", "[4] output.go", "[5] random_out.go", diff --git a/mbarchart.go b/mbarchart.go index 0f91e97..0ce6c45 100644 --- a/mbarchart.go +++ b/mbarchart.go @@ -8,7 +8,7 @@ import ( "fmt" ) -// This is the implemetation of multi-colored or stacked bar graph. This is different from default barGraph which is implemented in bar.go +// This is the implementation of multi-colored or stacked bar graph. This is different from default barGraph which is implemented in bar.go // Multi-Colored-BarChart creates multiple bars in a widget: /* bc := termui.NewMBarChart() @@ -72,7 +72,7 @@ func (bc *MBarChart) layout() { } bc.numStack = DataLen - //We need to know what is the mimimum size of data array data[0] could have 10 elements data[1] could have only 5, so we plot only 5 bar graphs + //We need to know what is the minimum size of data array data[0] could have 10 elements data[1] could have only 5, so we plot only 5 bar graphs for i := 0; i < DataLen; i++ { if bc.minDataLen > len(bc.Data[i]) { @@ -90,13 +90,13 @@ func (bc *MBarChart) layout() { for i := 0; i < bc.numStack; i++ { bc.dataNum[i] = make([][]rune, len(bc.Data[i])) - //For each stack of bar calcualte the rune + //For each stack of bar calculate the rune for j := 0; j < LabelLen && i < bc.numBar; j++ { n := bc.Data[i][j] s := fmt.Sprint(n) bc.dataNum[i][j] = trimStr2Runes(s, bc.BarWidth) } - //If color is not defined by default then populate a color that is different from the prevous bar + //If color is not defined by default then populate a color that is different from the previous bar if bc.BarColor[i] == ColorDefault && bc.NumColor[i] == ColorDefault { if i == 0 { bc.BarColor[i] = ColorBlack diff --git a/sparkline.go b/sparkline.go index d906e49..75e7c52 100644 --- a/sparkline.go +++ b/sparkline.go @@ -51,7 +51,7 @@ func NewSparkline() Sparkline { LineColor: ThemeAttr("sparkline.line.fg")} } -// NewSparklines return a new *Spaklines with given Sparkline(s), you can always add a new Sparkline later. +// NewSparklines return a new *Sparklines with given Sparkline(s), you can always add a new Sparkline later. func NewSparklines(ss ...Sparkline) *Sparklines { s := &Sparklines{Block: *NewBlock(), Lines: ss} return s