envoid/internal/common/str_convert.go
Sagi Dayan 420598cec7
Some checks failed
ci/ci / Check for spelling errors (pull_request) Successful in 35s
ci/ci / GonalgCI lint (pull_request) Failing after 2s
ci/ci / Make sure build does not fail (pull_request) Has been skipped
ci/ci / notify-fail (pull_request) Successful in 16s
Added lint to the CI. formatted all code accordingly
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2024-12-16 22:45:03 +02:00

11 lines
210 B
Go

package common
import "strings"
func StrToSnakeCase(s string) string {
snake := strings.ToLower(s)
snake = strings.ReplaceAll(snake, " ", "_")
snake = strings.ReplaceAll(snake, "\t", "_")
return snake
}