From d3412c965ad33cdceacc5b83c3f1185d43e53b18 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 21 Apr 2020 09:16:53 +0200 Subject: [PATCH] Rename List to ListAll --- pkg/service/v0/service.go | 2 +- pkg/settings/settings.go | 2 +- pkg/store/filesystem/store.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/service/v0/service.go b/pkg/service/v0/service.go index 6f78efc28c..f8fa95438d 100644 --- a/pkg/service/v0/service.go +++ b/pkg/service/v0/service.go @@ -52,7 +52,7 @@ func (g Service) ListSettingsBundles(c context.Context, req *proto.ListSettingsB func listSettingsBundles(g Service, extension string) ([]*proto.SettingsBundle, error) { if len(extension) == 0 { - return g.manager.List() + return g.manager.ListAll() } else { return g.manager.ListByExtension(extension) } diff --git a/pkg/settings/settings.go b/pkg/settings/settings.go index 1b3e7af0fe..2f43908ad3 100644 --- a/pkg/settings/settings.go +++ b/pkg/settings/settings.go @@ -17,6 +17,6 @@ type RegisterFunc func(*config.Config) Manager type Manager interface { Read(extension string, key string) (*proto.SettingsBundle, error) Write(bundle *proto.SettingsBundle) (*proto.SettingsBundle, error) - List() ([]*proto.SettingsBundle, error) + ListAll() ([]*proto.SettingsBundle, error) ListByExtension(extension string) ([]*proto.SettingsBundle, error) } diff --git a/pkg/store/filesystem/store.go b/pkg/store/filesystem/store.go index 43d9a075eb..720abacc4a 100644 --- a/pkg/store/filesystem/store.go +++ b/pkg/store/filesystem/store.go @@ -45,8 +45,8 @@ func New(cfg *config.Config) settings.Manager { return &s } -// List returns all the bundles in the mountPath folder -func (s Store) List() ([]*proto.SettingsBundle, error) { +// ListAll returns all the bundles in the mountPath folder +func (s Store) ListAll() ([]*proto.SettingsBundle, error) { records := []*proto.SettingsBundle{} bundles, err := ioutil.ReadDir(s.mountPath) if err != nil {