Simplified the logic of limit
This commit is contained in:
parent
c9b7a559a3
commit
4589798ade
|
@ -27,7 +27,7 @@ func formatList(in []string) string {
|
|||
// Limits the length of the string.
|
||||
func limit(s string, length int) string {
|
||||
if len(s) < length {
|
||||
return s[:len(s)]
|
||||
return s
|
||||
}
|
||||
|
||||
return s[:length]
|
||||
|
|
Loading…
Reference in New Issue