MCPcopy Index your code
hub / github.com/bytesizedhosting/bcd / Add

Method Add

plugins/proxy/proxy.go:31–44  ·  view source on GitHub ↗
(sourceUrl string, targetUrl string)

Source from the content-addressed store, hash-verified

29}
30
31func (self *ProxyMap) Add(sourceUrl string, targetUrl string) error {
32 log.Infof("Adding %s as proxy to %s", sourceUrl, targetUrl)
33 u, err := url.Parse(targetUrl)
34
35 if err != nil {
36 return err
37 }
38
39 pMap := *self
40 pMap[sourceUrl] = u
41 self = &pMap
42
43 return nil
44}

Callers 1

LoadFromConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected