()
| 16 | } |
| 17 | |
| 18 | func (d *DriverConfig) Check() error { |
| 19 | if d.URL == "" { |
| 20 | return fmt.Errorf("url is empty") |
| 21 | } |
| 22 | u, err := url.Parse(d.URL) |
| 23 | if err != nil { |
| 24 | return err |
| 25 | } |
| 26 | if u.Host == "" { |
| 27 | return fmt.Errorf("host is empty") |
| 28 | } |
| 29 | if u.Scheme == "" { |
| 30 | u.Scheme = "http" |
| 31 | } |
| 32 | d.URL = fmt.Sprintf("%s://%s", u.Scheme, u.Host) |
| 33 | return nil |
| 34 | } |
| 35 | |
| 36 | type Response[T any] struct { |
| 37 | Data *Data[T] `json:"data"` |
nothing calls this directly
no outgoing calls
no test coverage detected