refactor: improve styling a bit
This commit is contained in:
9
utils/description.go
Normal file
9
utils/description.go
Normal file
@ -0,0 +1,9 @@
|
||||
package utils
|
||||
|
||||
func TrimText(text string, keep int) string {
|
||||
if len(text) > keep {
|
||||
return text[0:keep] + "..."
|
||||
}
|
||||
|
||||
return text
|
||||
}
|
Reference in New Issue
Block a user