Documentation ¶
Index ¶
- func CommentConvert(name, comment string) string
- func CommentGetMethods(s string) (method string, name string)
- func DefaultConvert(name string) string
- func DefaultGetMethods(s string) (method string, name string)
- func RegisterRouter(r *gin.Engine, nameConvert func(string) string, ...) *gin.Engine
- func SlashConvertWithFive(s string) string
- func SlashConvertWithOne(s string) string
- func SlashConvertWithTen(s string) string
- func SlashConvertWithThree(s string) string
- func SlashConvertWithTwo(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommentConvert ¶
CommentConvert get api uri from comment There are has three conditions 1. // Hello function Hello(){} will convert to GET /Hello 2. // Hello // GET / will convert to GET /Hello 3. // Hello // GET /v1 will conver to GET /v1/Hello
func CommentGetMethods ¶
CommentGetMethods Spilt method and path from url Method and uri path must use space isolation e.g. GET /v1/Hello ==> GET /v1/Hello
func DefaultConvert ¶ added in v0.2.0
func DefaultGetMethods ¶ added in v0.2.0
func RegisterRouter ¶
func SlashConvertWithFive ¶
func SlashConvertWithOne ¶
func SlashConvertWithTen ¶
func SlashConvertWithThree ¶
func SlashConvertWithTwo ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.