|
@@ -1,6 +1,7 @@
|
|
package door
|
|
package door
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
+ "log"
|
|
"strings"
|
|
"strings"
|
|
"unicode"
|
|
"unicode"
|
|
)
|
|
)
|
|
@@ -109,7 +110,11 @@ func (l *Line) LineLength(text *string) {
|
|
} else {
|
|
} else {
|
|
length = len([]byte(*text))
|
|
length = len([]byte(*text))
|
|
}
|
|
}
|
|
- *text += strings.Repeat(" ", l.Width-length)
|
|
|
|
|
|
+ if length > l.Width {
|
|
|
|
+ log.Printf("ERROR: Line Width %d: Have %d\n", l.Width, length)
|
|
|
|
+ } else {
|
|
|
|
+ *text += strings.Repeat(" ", l.Width-length)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|