-
Notifications
You must be signed in to change notification settings - Fork 1
Extend Provider interface with lifecycle methods #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,22 @@ func (p *MySQLProvider) DefaultPorts() providers.PortRange { | |
| } | ||
| } | ||
|
|
||
| func (p *MySQLProvider) FindBinary(version string) (string, error) { | ||
| return "", fmt.Errorf("MySQLProvider.FindBinary: use sandbox package directly (not yet migrated)") | ||
| } | ||
|
|
||
| func (p *MySQLProvider) CreateSandbox(config providers.SandboxConfig) (*providers.SandboxInfo, error) { | ||
| return nil, fmt.Errorf("MySQLProvider.CreateSandbox: use sandbox package directly (not yet migrated)") | ||
| } | ||
|
Comment on lines
+39
to
+41
|
||
|
|
||
| func (p *MySQLProvider) StartSandbox(dir string) error { | ||
| return fmt.Errorf("MySQLProvider.StartSandbox: use sandbox package directly (not yet migrated)") | ||
| } | ||
|
Comment on lines
+43
to
+45
|
||
|
|
||
| func (p *MySQLProvider) StopSandbox(dir string) error { | ||
| return fmt.Errorf("MySQLProvider.StopSandbox: use sandbox package directly (not yet migrated)") | ||
| } | ||
|
Comment on lines
+47
to
+49
|
||
|
|
||
| func Register(reg *providers.Registry) error { | ||
| return reg.Register(NewMySQLProvider()) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These stub methods use fmt.Errorf with a constant string and no formatting args. staticcheck (S1028) recommends using errors.New for constant error strings (or define a sentinel error and wrap it with %w). This will fail the repo's golangci-lint CI job as-is.