mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
26e5320a78
This is part of a general effort to move all of Terraform's non-library package surface under internal in order to reinforce that these are for internal use within Terraform only. If you were previously importing packages under this prefix into an external codebase, you could pin to an earlier release tag as an interim solution until you've make a plan to achieve the same functionality some other way.
27 lines
663 B
Go
27 lines
663 B
Go
package experiments
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// UnavailableError is the error type returned by GetCurrent when the requested
|
|
// experiment is not recognized at all.
|
|
type UnavailableError struct {
|
|
ExperimentName string
|
|
}
|
|
|
|
func (e UnavailableError) Error() string {
|
|
return fmt.Sprintf("no current experiment is named %q", e.ExperimentName)
|
|
}
|
|
|
|
// ConcludedError is the error type returned by GetCurrent when the requested
|
|
// experiment is recognized as concluded.
|
|
type ConcludedError struct {
|
|
ExperimentName string
|
|
Message string
|
|
}
|
|
|
|
func (e ConcludedError) Error() string {
|
|
return fmt.Sprintf("experiment %q has concluded: %s", e.ExperimentName, e.Message)
|
|
}
|