diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-07-14 10:45:04 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-07-14 10:45:04 +0530 |
| commit | 826434a8597122847f643abe835d5c6e5dd74c4c (patch) | |
| tree | d07d21bc30d5068e6c1e828a3e42747a8411571e | |
| parent | bcfb199ac8e5399e1a92cfbbc28af3674f80959d (diff) | |
| download | galleryd-826434a8597122847f643abe835d5c6e5dd74c4c.tar.xz galleryd-826434a8597122847f643abe835d5c6e5dd74c4c.zip | |
refactor(service): rename load to reload
| -rw-r--r-- | cmd/galleryd/main.go | 2 | ||||
| -rw-r--r-- | internal/api/api_test.go | 2 | ||||
| -rw-r--r-- | internal/service/reload.go (renamed from internal/service/load.go) | 2 | ||||
| -rw-r--r-- | internal/service/service.go | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/cmd/galleryd/main.go b/cmd/galleryd/main.go index 1edd68a..2c26a96 100644 --- a/cmd/galleryd/main.go +++ b/cmd/galleryd/main.go @@ -65,7 +65,7 @@ func main() { scanner, builder, ) - if err := galleryService.Load(ctx); err != nil { + if err := galleryService.Reload(ctx); err != nil { log.Fatal(err) } diff --git a/internal/api/api_test.go b/internal/api/api_test.go index c1980fd..0b1c68d 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -37,7 +37,7 @@ func (f fakeThumbnailGenerator) Generate( }, nil } -func (f fakeGalleryService) Load(ctx context.Context) error { +func (f fakeGalleryService) Reload(ctx context.Context) error { return nil } diff --git a/internal/service/load.go b/internal/service/reload.go index 09bbc20..98e4710 100644 --- a/internal/service/load.go +++ b/internal/service/reload.go @@ -7,7 +7,7 @@ import ( ) // Load scans the configured roots and rebuilds the in-memory gallery. -func (s *galleryService) Load(ctx context.Context) error { +func (s *galleryService) Reload(ctx context.Context) error { files, err := s.scanner.Scan(ctx) if err != nil { return err diff --git a/internal/service/service.go b/internal/service/service.go index 68a764e..063c0e7 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -9,7 +9,7 @@ import ( // GalleryService provides gallery operations. type GalleryService interface { // Load scans the configured roots and builds the in-memory gallery. - Load(ctx context.Context) error + Reload(ctx context.Context) error // Gallery returns the currently loaded gallery. Gallery(ctx context.Context) ([]gallery.Photo, error) |