Skip to content

Commit

Permalink
optimize code generate core logic
Browse files Browse the repository at this point in the history
  • Loading branch information
alimy committed Dec 26, 2023
1 parent c6891d4 commit bd17be9
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir-example/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0
github.com/alimy/mir/v4 v4.1.0-beta.1
github.com/gin-gonic/gin v1.9.1
)

Expand Down
4 changes: 2 additions & 2 deletions examples/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.1.0-beta.1 h1:TdXNCmCSqjX8jj4KW4tTCMV2Ij1PpMoguJw5pinw/zk=
github.com/alimy/mir/v4 v4.1.0-beta.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
Expand Down
8 changes: 4 additions & 4 deletions examples/mirc/auto/api/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/mirc/auto/api/v1/admin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/mirc/auto/api/v1/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/mirc/auto/api/v2/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions examples/mirc/auto/api/v3/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion internal/utils/set_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

package utils

import "net/http"
import (
"net/http"
"sort"
)

// HttpMethodSet http method set struct
type HttpMethodSet map[string]struct{}
Expand All @@ -31,5 +34,6 @@ func (s HttpMethodSet) List() []string {
for m := range s {
methods = append(methods, m)
}
sort.Strings(methods)
return methods
}

0 comments on commit bd17be9

Please sign in to comment.