Skip to content

Commit 5efa6d9

Browse files
committed
chore: rename getServerURL to ServerURL
1 parent 9fef13e commit 5efa6d9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

codersdk/toolsdk/chatgpt.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func createObjectID(objectType ObjectType, id string) ObjectID {
4949
}
5050

5151
func searchTemplates(ctx context.Context, deps Deps, query string) ([]SearchResultItem, error) {
52-
serverURL := deps.getServerURL()
52+
serverURL := deps.ServerURL()
5353
templates, err := deps.coderClient.Templates(ctx, codersdk.TemplateFilter{
5454
SearchQuery: query,
5555
})
@@ -69,7 +69,7 @@ func searchTemplates(ctx context.Context, deps Deps, query string) ([]SearchResu
6969
}
7070

7171
func searchWorkspaces(ctx context.Context, deps Deps, query string) ([]SearchResultItem, error) {
72-
serverURL := deps.getServerURL()
72+
serverURL := deps.ServerURL()
7373
workspaces, err := deps.coderClient.Workspaces(ctx, codersdk.WorkspaceFilter{
7474
FilterQuery: query,
7575
})
@@ -344,7 +344,7 @@ func fetchWorkspace(ctx context.Context, deps Deps, workspaceID string) (FetchRe
344344
ID: workspace.ID.String(),
345345
Title: workspace.Name,
346346
Text: string(workspaceJSON),
347-
URL: fmt.Sprintf("%s/%s/%s", deps.getServerURL(), workspace.OwnerName, workspace.Name),
347+
URL: fmt.Sprintf("%s/%s/%s", deps.ServerURL(), workspace.OwnerName, workspace.Name),
348348
}, nil
349349
}
350350

@@ -365,7 +365,7 @@ func fetchTemplate(ctx context.Context, deps Deps, templateID string) (FetchResu
365365
ID: template.ID.String(),
366366
Title: template.DisplayName,
367367
Text: string(templateJSON),
368-
URL: fmt.Sprintf("%s/templates/%s/%s", deps.getServerURL(), template.OrganizationName, template.Name),
368+
URL: fmt.Sprintf("%s/templates/%s/%s", deps.ServerURL(), template.OrganizationName, template.Name),
369369
}, nil
370370
}
371371

codersdk/toolsdk/toolsdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type Deps struct {
5858
report func(ReportTaskArgs) error
5959
}
6060

61-
func (d Deps) getServerURL() string {
61+
func (d Deps) ServerURL() string {
6262
serverURLCopy := *d.coderClient.URL
6363
serverURLCopy.Path = ""
6464
serverURLCopy.RawQuery = ""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy