Skip to content

Commit

Permalink
Cleanup path replacement (#2852)
Browse files Browse the repository at this point in the history
* Cleanup path replacement

Use strings.ReplaceAll instead of strings.Replace, and build the
placehold string properly.

* pre-commit fixes

---------

Co-authored-by: ci.datadog-api-spec <[email protected]> 2a26be6
  • Loading branch information
skarimo committed Dec 20, 2024
1 parent 865af98 commit 316b5cd
Show file tree
Hide file tree
Showing 95 changed files with 56,198 additions and 54,377 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
<dd><a href="#ReadBody">func ReadBody(response *http.Response) ([]byte, error)</a></dd>


<dd><a href="#ReplacePathParameter">func ReplacePathParameter(path, pathKey, parameterValue string) string</a></dd>


<dd><a href="#ReportError">func ReportError(format string, a ...interface{}) error</a></dd>


Expand Down Expand Up @@ -803,7 +806,21 @@ <h2 id="ReadBody">func <a href="https://github.com/DataDog/datadog-api-client-go



<h2 id="ReportError">func <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L457">ReportError</a>
<h2 id="ReplacePathParameter">func <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L124">ReplacePathParameter</a>
<a class="permalink" href="#ReplacePathParameter">&#xb6;</a>


</h2>
<pre>func ReplacePathParameter(path, pathKey, parameterValue <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="https://pkg.go.dev/builtin/#string">string</a></pre>
<p>ReplacePathParameter replace all occurrences of `pathKey` in `path` with `parameterValue`.







<h2 id="ReportError">func <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L462">ReportError</a>
<a class="permalink" href="#ReportError">&#xb6;</a>


Expand Down Expand Up @@ -897,7 +914,7 @@ <h3 id="NewAPIClient">func <a href="https://github.com/DataDog/datadog-api-clien



<h3 id="APIClient.CallAPI">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L124">CallAPI</a>
<h3 id="APIClient.CallAPI">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L129">CallAPI</a>
<a class="permalink" href="#APIClient.CallAPI">&#xb6;</a>


Expand All @@ -910,7 +927,7 @@ <h3 id="APIClient.CallAPI">func (*APIClient) <a href="https://github.com/DataDog



<h3 id="APIClient.Decode">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L411">Decode</a>
<h3 id="APIClient.Decode">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L416">Decode</a>
<a class="permalink" href="#APIClient.Decode">&#xb6;</a>


Expand All @@ -923,7 +940,7 @@ <h3 id="APIClient.Decode">func (*APIClient) <a href="https://github.com/DataDog/



<h3 id="APIClient.GetConfig">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L214">GetConfig</a>
<h3 id="APIClient.GetConfig">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L219">GetConfig</a>
<a class="permalink" href="#APIClient.GetConfig">&#xb6;</a>


Expand All @@ -937,7 +954,7 @@ <h3 id="APIClient.GetConfig">func (*APIClient) <a href="https://github.com/DataD



<h3 id="APIClient.PrepareRequest">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L219">PrepareRequest</a>
<h3 id="APIClient.PrepareRequest">func (*APIClient) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L224">PrepareRequest</a>
<a class="permalink" href="#APIClient.PrepareRequest">&#xb6;</a>


Expand Down Expand Up @@ -1186,7 +1203,7 @@ <h2 id="FormFile">type <a href="https://github.com/DataDog/datadog-api-client-go



<h2 id="GenericOpenAPIError">type <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L519">GenericOpenAPIError</a>
<h2 id="GenericOpenAPIError">type <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L524">GenericOpenAPIError</a>
<a class="permalink" href="#GenericOpenAPIError">&#xb6;</a>


Expand All @@ -1212,7 +1229,7 @@ <h2 id="GenericOpenAPIError">type <a href="https://github.com/DataDog/datadog-ap



<h3 id="GenericOpenAPIError.Body">func (GenericOpenAPIError) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L531">Body</a>
<h3 id="GenericOpenAPIError.Body">func (GenericOpenAPIError) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L536">Body</a>
<a class="permalink" href="#GenericOpenAPIError.Body">&#xb6;</a>


Expand All @@ -1225,7 +1242,7 @@ <h3 id="GenericOpenAPIError.Body">func (GenericOpenAPIError) <a href="https://gi



<h3 id="GenericOpenAPIError.Error">func (GenericOpenAPIError) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L526">Error</a>
<h3 id="GenericOpenAPIError.Error">func (GenericOpenAPIError) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L531">Error</a>
<a class="permalink" href="#GenericOpenAPIError.Error">&#xb6;</a>


Expand All @@ -1238,7 +1255,7 @@ <h3 id="GenericOpenAPIError.Error">func (GenericOpenAPIError) <a href="https://g



<h3 id="GenericOpenAPIError.Model">func (GenericOpenAPIError) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L536">Model</a>
<h3 id="GenericOpenAPIError.Model">func (GenericOpenAPIError) <a href="https://github.com/DataDog/datadog-api-client-go/blob/master/api/datadog/client.go#L541">Model</a>
<a class="permalink" href="#GenericOpenAPIError.Model">&#xb6;</a>


Expand Down
Loading

0 comments on commit 316b5cd

Please sign in to comment.