mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-03-30 23:37:04 +00:00
13 lines
277 B
Go
13 lines
277 B
Go
package markup
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// Function that returns a function that can strip `prefix` and trim whitespace when called.
|
|
func remover(prefix string) func(string) string {
|
|
return func(l string) string {
|
|
return strings.TrimSpace(strings.TrimPrefix(l, prefix))
|
|
}
|
|
}
|