Initial commit: shared Go utilities (ssr, stringsx)
Extracted from sweeper to share across Go projects: - ssr: template caching and SSR writer - stringsx: string helpers
This commit is contained in:
commit
173d775ae2
4 changed files with 87 additions and 0 deletions
9
stringsx/stringsx.go
Normal file
9
stringsx/stringsx.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Package stringsx provides string-related helpers.
|
||||
package stringsx
|
||||
|
||||
import "strings"
|
||||
|
||||
// IsBlank reports whether a string contains only whitespace.
|
||||
func IsBlank(s string) bool {
|
||||
return strings.TrimSpace(s) == ""
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue