arttor/helmify

View on GitHub
pkg/format/trailing_whitespaces.go

Summary

Maintainability
A
0 mins
Test Coverage
package format

import "regexp"

var removeWhitespace = regexp.MustCompile(`(\s+)(\n|$)`)

func RemoveTrailingWhitespaces(in string) string {
    return removeWhitespace.ReplaceAllString(in, "$2")
}