MCPcopy Index your code
hub / github.com/coder/coder / asRequestOption

Method asRequestOption

codersdk/workspaces.go:147–155  ·  view source on GitHub ↗

asRequestOption returns a function that can be used in (*Client).Request. It modifies the request query parameters.

()

Source from the content-addressed store, hash-verified

145// asRequestOption returns a function that can be used in (*Client).Request.
146// It modifies the request query parameters.
147func (o WorkspaceOptions) asRequestOption() RequestOption {
148 return func(r *http.Request) {
149 q := r.URL.Query()
150 if o.IncludeDeleted {
151 q.Set("include_deleted", "true")
152 }
153 r.URL.RawQuery = q.Encode()
154 }
155}
156
157// Workspace returns a single workspace.
158func (c *Client) Workspace(ctx context.Context, id uuid.UUID) (Workspace, error) {

Callers 1

DeletedWorkspaceMethod · 0.95

Calls 2

EncodeMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected