mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-19 17:50:00 +00:00
709d537a1c
Update our helper/schema to v0.11.7, and update all its dependencies to their latest, as well.
24 lines
561 B
Go
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
|
|
}
|