forked from forgejo/forgejo
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.
This commit is contained in:
parent
937ef6fa90
commit
20c135cd46
25 changed files with 629 additions and 581 deletions
|
@ -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 ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue