11 lines
210 B
Go
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
|
|
}
|