Browse Source

Trim func to utils

Vova Tkach 5 years ago
parent
commit
4bd3243b06
1 changed files with 4 additions and 0 deletions
  1. 4 0
      utils/utils.go

+ 4 - 0
utils/utils.go

@@ -22,6 +22,10 @@ import (
 	"golang-fave/consts"
 )
 
+func Trim(str string) string {
+	return strings.TrimSpace(str)
+}
+
 func IsFileExists(filename string) bool {
 	if _, err := os.Stat(filename); !os.IsNotExist(err) {
 		if err == nil {