-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f05f20e
commit 4289b36
Showing
8 changed files
with
65 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/go | ||
{ | ||
"name": "clearbank-api-client-go", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/go:0-1.19", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"golang.Go", | ||
"wayou.vscode-todo-highlight" | ||
] | ||
} | ||
}, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"name": "clearbank-api-client-go", | ||
"image": "mcr.microsoft.com/devcontainers/go:1-1.21-bookworm", | ||
"features": { | ||
"ghcr.io/brokeyourbike/devcontainer-features/mockery-go:0": { | ||
"version": "2.14.0" | ||
}, | ||
"ghcr.io/brokeyourbike/devcontainer-features/staticcheck:0": { | ||
"version": "2023.1" | ||
"version": "2023.1.5" | ||
}, | ||
"ghcr.io/brokeyourbike/devcontainer-features/mockery-go:0": { | ||
"version": "2.33.0" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"golang.Go" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ | |
go.work | ||
|
||
.DS_Store | ||
/mock_*.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
inpackage: True | ||
all: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package clearbank | ||
|
||
import ( | ||
"strings" | ||
) | ||
|
||
// WithHTTPClient sets the HTTP client for the ClearBank API client. | ||
func WithHTTPClient(c HttpClient) ClientOption { | ||
return func(target *client) { | ||
target.httpClient = c | ||
} | ||
} | ||
|
||
// WithBaseURL sets the base URL for the ClearBank API client. | ||
func WithBaseURL(baseURL string) ClientOption { | ||
return func(target *client) { | ||
target.baseURL = strings.TrimSuffix(baseURL, "/") | ||
} | ||
} |