aboutsummaryrefslogtreecommitdiffstats
path: root/modules/util
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2022-08-30 21:15:45 -0500
committerGitHub <noreply@github.com>2022-08-30 21:15:45 -0500
commita48d6ba4b4be4207a2c78c36b095fb69938e5ae5 (patch)
tree6b77af95e14bb9216b6b5dca321a5804a63cfced /modules/util
parent3edc14b687626f5ca1b4ecbe1d0d400b058f8dac (diff)
downloadgitea-a48d6ba4b4be4207a2c78c36b095fb69938e5ae5.tar.gz
gitea-a48d6ba4b4be4207a2c78c36b095fb69938e5ae5.zip
Go 1.19 format (#20758)
* 1.19 gofumpt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change CSV test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Commit whitespace fixes from @zeripath Co-authored-by: zeripath <art27@cantab.net> * Update emoji Signed-off-by: jolheiser <john.olheiser@gmail.com> * bump swagger & fix generate-swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'modules/util')
-rw-r--r--modules/util/string.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/util/string.go b/modules/util/string.go
index 4301f75f99..2da2bc5dc4 100644
--- a/modules/util/string.go
+++ b/modules/util/string.go
@@ -17,13 +17,13 @@ func isSnakeCaseLowerOrNumber(c byte) bool {
// ToSnakeCase convert the input string to snake_case format.
//
// Some samples.
-// "FirstName" => "first_name"
-// "HTTPServer" => "http_server"
-// "NoHTTPS" => "no_https"
-// "GO_PATH" => "go_path"
-// "GO PATH" => "go_path" // space is converted to underscore.
-// "GO-PATH" => "go_path" // hyphen is converted to underscore.
//
+// "FirstName" => "first_name"
+// "HTTPServer" => "http_server"
+// "NoHTTPS" => "no_https"
+// "GO_PATH" => "go_path"
+// "GO PATH" => "go_path" // space is converted to underscore.
+// "GO-PATH" => "go_path" // hyphen is converted to underscore.
func ToSnakeCase(input string) string {
if len(input) == 0 {
return ""