MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / NewResponse

Function NewResponse

auth/auth.go:72–84  ·  view source on GitHub ↗
(paramstr string, logger *clog.CondLogger)

Source from the content-addressed store, hash-verified

70}
71
72func NewResponse(paramstr string, logger *clog.CondLogger) (Auth, error) {
73 url, err := url.Parse(paramstr)
74 if err != nil {
75 return nil, err
76 }
77
78 switch strings.ToLower(url.Scheme) {
79 case "static":
80 return NewStaticResponse(url, logger)
81 default:
82 return nil, errors.New("Unknown response scheme")
83 }
84}

Callers 3

runFunction · 0.92
TestNewResponseStaticFunction · 0.85

Calls 1

NewStaticResponseFunction · 0.85

Tested by 2

TestNewResponseStaticFunction · 0.68