MCPcopy Create free account
hub / github.com/52funny/pikpakcli / WithContext

Method WithContext

internal/api/pikpak.go:78–88  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

76}
77
78func (p *PikPak) WithContext(ctx context.Context) *PikPak {
79 if p == nil {
80 return nil
81 }
82 clone := *p
83 if ctx == nil {
84 ctx = context.Background()
85 }
86 clone.ctx = ctx
87 return &clone
88}
89
90func (p *PikPak) newRequest(method, url string, body io.Reader) (*http.Request, error) {
91 return http.NewRequestWithContext(p.requestContext(), method, url, body)

Callers 2

StartFunction · 0.95
TestPikPakWithContextFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestPikPakWithContextFunction · 0.76