Complete fills in any fields not set that are required to have valid data and can be derived from other fields.
()
| 115 | |
| 116 | // Complete fills in any fields not set that are required to have valid data and can be derived from other fields. |
| 117 | func (c *ExtraConfig) complete() *completedExtraConfig { |
| 118 | if c.Addr == "" { |
| 119 | c.Addr = "127.0.0.1:8081" |
| 120 | } |
| 121 | |
| 122 | return &completedExtraConfig{c} |
| 123 | } |
| 124 | |
| 125 | // New create a grpcAPIServer instance. |
| 126 | func (c *completedExtraConfig) New() (*grpcAPIServer, error) { |