diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-09-22 21:58:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 21:58:31 +0800 |
commit | 20c135cd468a5c7f84994787ffb8ee0db4d87da9 (patch) | |
tree | 0c40a2848c4ae64c0ade79b0825c0bda4deee381 /modules/util/string.go | |
parent | 937ef6fa906cd6ea28e181cfa92bacf409a75f69 (diff) | |
download | gitea-20c135cd468a5c7f84994787ffb8ee0db4d87da9.tar.gz gitea-20c135cd468a5c7f84994787ffb8ee0db4d87da9.zip |
Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239)
The images used by Gitea's drone pipeline were upgraded to Go 1.19.x
It causes the lint fails because Go 1.19 uses new code format.
This PR partially backport #20758 (including the emoji-data sync),
partially fix the format manually.
Diffstat (limited to 'modules/util/string.go')
-rw-r--r-- | modules/util/string.go | 12 |
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 "" |