MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Validate

Method Validate

module/system/dto/input.go:14–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12}
13
14func (i *InputSetting) Validate() error {
15 if i.InvokeAddress != nil {
16 _, err := url.Parse(*i.InvokeAddress)
17 if err != nil {
18 return err
19 }
20 }
21
22 if i.OllamaAddress != nil {
23 _, err := url.Parse(*i.OllamaAddress)
24 if err != nil {
25 return err
26 }
27 }
28 return nil
29}
30
31func ToKeyMap(i interface{}) map[string]string {
32 result := make(map[string]string)

Callers 2

TestMapFunction · 0.95
SetMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestMapFunction · 0.76