diff --git a/repo/fsrepo/config_component.go b/repo/fsrepo/config_component.go index 57781cc4d..4ab77c8c4 100644 --- a/repo/fsrepo/config_component.go +++ b/repo/fsrepo/config_component.go @@ -7,6 +7,7 @@ import ( ) var _ component = &configComponent{} +var _ componentInitializationChecker = configComponentIsInitialized // configComponent abstracts the config component of the FSRepo. // NB: create with makeConfigComponent function. diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index caeef670b..c89820410 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -56,6 +56,7 @@ type component interface { Open() error io.Closer } +type componentInitializationChecker func(path string) bool // At returns a handle to an FSRepo at the provided |path|. func At(repoPath string) *FSRepo { @@ -256,7 +257,7 @@ func IsInitialized(path string) bool { // componentInitCheckers are functions that indicate whether the component // is isInitialized - var componentInitCheckers = []func(path string) bool{ + var componentInitCheckers = []componentInitializationChecker{ configComponentIsInitialized, // TODO add datastore component initialization checker }