MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / Check

Method Check

log-driver/loki/entity.go:18–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18func (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
36type Response[T any] struct {
37 Data *Data[T] `json:"data"`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected