| 123456789101112131415161718192021222324252627282930 |
- package handler
- import (
- "context"
- "fmt"
- "dashoo.cn/common_definition/comm_def"
- )
- type Nullable struct {
- Str *string
- Int *int
- Bool *bool
- Slice *[]int
- }
- type TestController struct{}
- func (s *TestController) Nullable(ctx context.Context, req *Nullable, rsp *comm_def.CommonMsg) error {
- fmt.Printf("%v \n", req)
- fmt.Printf("%v \n", req.Str)
- fmt.Printf("%v \n", req.Int)
- fmt.Printf("%v \n", req.Bool)
- fmt.Printf("%v \n", req.Slice)
- rsp.Code = 200
- rsp.Msg = "success"
- rsp.Data = nil
- fmt.Printf("%v \n", rsp)
- return nil
- }
|