What is this line for? trimming a trailing `'-'`

What if the end of the string is `'---'`
or starts with a `'-'`

My thought is that this should be a trim on both ends and that we might use
http://golang.org/pkg/bytes/#Trim to achieve the same