(cmd *cobra.Command)
| 206 | } |
| 207 | |
| 208 | func GetServerInfo(cmd *cobra.Command) *Server { |
| 209 | ip, _ := cmd.Flags().GetString("ip") |
| 210 | port, _ := cmd.Flags().GetUint32("api-port") |
| 211 | rpcPort, _ := cmd.Flags().GetUint32("rpc-port") |
| 212 | svcPort, _ := cmd.Flags().GetUint32("svc-port") |
| 213 | return &Server{ip, port, rpcPort, svcPort} |
| 214 | } |
| 215 | |
| 216 | func GetTimeout(cmd *cobra.Command) time.Duration { |
| 217 | t, _ := cmd.Flags().GetDuration("timeout") |