terraform-provider-google/vendor/github.com/hashicorp/terraform/registry/errors.go
Nathan McKinley e55e6a403f
Revert "Update hashicorp/terraform to 0.12-alpha4. (#2744)" (#2752)
This reverts commit b89618ccaa, containing
0.12-alpha4, which is broken.  Sets don't seem to work, and neither do
many resources.
2018-12-26 13:43:19 -08:00

24 lines
561 B
Go

package registry
import (
"fmt"
"github.com/hashicorp/terraform/registry/regsrc"
)
type errModuleNotFound struct {
addr *regsrc.Module
}
func (e *errModuleNotFound) Error() string {
return fmt.Sprintf("module %s not found", e.addr)
}
// IsModuleNotFound returns true only if the given error is a "module not found"
// error. This allows callers to recognize this particular error condition
// as distinct from operational errors such as poor network connectivity.
func IsModuleNotFound(err error) bool {
_, ok := err.(*errModuleNotFound)
return ok
}