| | |
| | | } |
| | | |
| | | cli := product.NewProductServiceClient(productServiceConn) |
| | | |
| | | getProductListResponse, err := cli.GetProductList(ctx.GetCtx(), &product.GetProductListRequest{ |
| | | Page: cast.ToInt32(params.Page), |
| | | PageSize: cast.ToInt32(params.PageSize), |
| | |
| | | log.Fatalf("Unmarshal err:%v", err) |
| | | } |
| | | ShowConfig() |
| | | CheckConfig() |
| | | } |
| | | |
| | | // WriteConfig 回写配置 |
| | |
| | | log.Printf(" GrpcServiceAddr: %+v", Conf.GrpcServiceAddr) |
| | | log.Println("......................................................") |
| | | } |
| | | |
| | | func CheckConfig() { |
| | | if Conf.GrpcServiceAddr.Aps == "" { |
| | | log.Fatalf("%v 尚未配置", "GrpcServiceAddr.Aps") |
| | | } |
| | | } |