Skip to content

Commit ccc1bd1

Browse files
author
treilik
committed
satisfy the linter
correcting missspell and adding toplevel-comment period
1 parent ef9f79a commit ccc1bd1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

wordwrap/wordwrap.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ type WordWrap struct {
2323
Newline []rune
2424
KeepNewlines bool
2525
HardWrap bool
26-
TabReplace string // since tabs can have differrent lenghts, replace them with this when hardwrap is enabled
26+
TabReplace string // since tabs can have differrent lengths, replace them with this when hardwrap is enabled
2727
PreserveSpaces bool
2828

2929
buf bytes.Buffer // processed and, in line, accepted bytes
3030
space bytes.Buffer // pending continues spaces bytes
3131
word ansi.Buffer // pending continues word bytes
3232

33-
lineLen int // the visible lenght of the line not accorat for tabs
33+
lineLen int // the visible length of the line not accorat for tabs
3434
ansi bool
3535

3636
wroteBegin bool // mark is since the last newline something has writen to the buffer (for ansi restart)
@@ -65,7 +65,7 @@ func String(s string, limit int) string {
6565
}
6666

6767
// HardWrap is a shorthand for declaring a new hardwraping WordWrap instance,
68-
// since varibale lenght characters can not be hard wraped to a fixed lenght,
68+
// since varibale length characters can not be hard wraped to a fixed length,
6969
// tabs will be replaced by TabReplace, use according amount of spaces.
7070
func HardWrap(s string, limit int, tabReplace string) string {
7171
f := NewWriter(limit)
@@ -77,7 +77,7 @@ func HardWrap(s string, limit int, tabReplace string) string {
7777
return f.String()
7878
}
7979

80-
// addes pending spaces to the buf(fer) ... and resets the space buffer
80+
// addes pending spaces to the buf(fer) and then resets the space buffer.
8181
func (w *WordWrap) addSpace() {
8282
// the line and the pending spaces are less than the limit
8383
if w.lineLen+w.space.Len() <= w.Limit {
@@ -231,13 +231,13 @@ func (w *WordWrap) Close() error {
231231
}
232232

233233
// Bytes returns the word-wrapped result as a byte slice.
234-
// Make sure to have closed the worwrapper, befor calling it
234+
// Make sure to have closed the worwrapper, befor calling it.
235235
func (w *WordWrap) Bytes() []byte {
236236
return w.buf.Bytes()
237237
}
238238

239239
// String returns the word-wrapped result as a string.
240-
// Make sure to have closed the worwrapper, befor calling it
240+
// Make sure to have closed the worwrapper, befor calling it.
241241
func (w *WordWrap) String() string {
242242
return w.buf.String()
243243
}

0 commit comments

Comments
 (0)