You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
366 B
17 lines
366 B
package main |
|
|
|
import ( |
|
"git.echinacities.com/mogfee/protoc-gen-kit/example/service" |
|
user "git.echinacities.com/mogfee/protoc-gen-kit/proto/v1" |
|
"github.com/gin-gonic/gin" |
|
) |
|
|
|
func main() { |
|
app := gin.Default() |
|
srv := service.UserService{} |
|
app.Use(func(c *gin.Context) { |
|
c.Set("userId", 11) |
|
}) |
|
user.RegisterUserHandler(app, &srv) |
|
app.Run("localhost:8888") |
|
}
|
|
|