MCPcopy Index your code
hub / github.com/dnote/dnote / validate

Function validate

pkg/server/config/config.go:104–117  ·  view source on GitHub ↗
(c Config)

Source from the content-addressed store, hash-verified

102}
103
104func validate(c Config) error {
105 if _, err := url.ParseRequestURI(c.BaseURL); err != nil {
106 return errors.Wrapf(ErrBaseURLInvalid, "'%s'", c.BaseURL)
107 }
108 if c.Port == "" {
109 return ErrPortInvalid
110 }
111
112 if c.DBPath == "" {
113 return ErrDBMissingPath
114 }
115
116 return nil
117}

Callers 2

TestValidateFunction · 0.85
NewFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestValidateFunction · 0.68