MCPcopy Index your code
hub / github.com/larksuite/cli / resolveURL

Method resolveURL

internal/cmdutil/dryrun.go:102–107  ·  view source on GitHub ↗

resolveURL replaces :key placeholders in url with path-escaped values from extra.

(rawURL string)

Source from the content-addressed store, hash-verified

100
101// resolveURL replaces :key placeholders in url with path-escaped values from extra.
102func (d *DryRunAPI) resolveURL(rawURL string) string {
103 for k, v := range d.extra {
104 rawURL = strings.ReplaceAll(rawURL, ":"+k, url.PathEscape(fmt.Sprintf("%v", v)))
105 }
106 return rawURL
107}
108
109// MarshalJSON serializes as {"description": "...", "api": [...calls with resolved URLs], ...extra}.
110func (d *DryRunAPI) MarshalJSON() ([]byte, error) {

Callers 2

MarshalJSONMethod · 0.95
FormatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected