diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-30 10:45:30 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-30 10:45:30 +0300 |
| commit | adecf1fd2e55a0605d03f36952846f6336506d37 (patch) | |
| tree | c02af76c7ea906f22c742cf4be83e488e5fcf050 /internal/scanner | |
| parent | 0d7063e5c91efeb219a4be5b93525b0837c8d3be (diff) | |
Rename module to codeberg.org/snonux/play (task aa)
- Update go.mod module path
- Replace all internal imports from github.com/paul/kiss-media-player to codeberg.org/snonux/play
- Run go mod tidy and gofmt -w .
Diffstat (limited to 'internal/scanner')
| -rw-r--r-- | internal/scanner/fs.go | 2 | ||||
| -rw-r--r-- | internal/scanner/scanner.go | 10 | ||||
| -rw-r--r-- | internal/scanner/scanner_test.go | 28 |
3 files changed, 21 insertions, 19 deletions
diff --git a/internal/scanner/fs.go b/internal/scanner/fs.go index 8616fde..c4299c5 100644 --- a/internal/scanner/fs.go +++ b/internal/scanner/fs.go @@ -19,7 +19,7 @@ type FS interface { type osFS struct{} func (osFS) ReadDir(name string) ([]os.DirEntry, error) { return os.ReadDir(name) } -func (osFS) Stat(name string) (os.FileInfo, error) { return os.Stat(name) } +func (osFS) Stat(name string) (os.FileInfo, error) { return os.Stat(name) } func (osFS) MkdirAll(path string, perm os.FileMode) error { return os.MkdirAll(path, perm) } diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index ec7638e..a1effd7 100644 --- a/internal/scanner/scanner.go +++ b/internal/scanner/scanner.go @@ -8,11 +8,11 @@ import ( "path/filepath" "strings" - "github.com/paul/kiss-media-player/internal/clock" - "github.com/paul/kiss-media-player/internal/model" - "github.com/paul/kiss-media-player/internal/probe" - "github.com/paul/kiss-media-player/internal/repository" - "github.com/paul/kiss-media-player/internal/thumb" + "codeberg.org/snonux/play/internal/clock" + "codeberg.org/snonux/play/internal/model" + "codeberg.org/snonux/play/internal/probe" + "codeberg.org/snonux/play/internal/repository" + "codeberg.org/snonux/play/internal/thumb" ) // Scanner defines the filesystem scanning contract. diff --git a/internal/scanner/scanner_test.go b/internal/scanner/scanner_test.go index b924c85..8da32a4 100644 --- a/internal/scanner/scanner_test.go +++ b/internal/scanner/scanner_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" - "github.com/paul/kiss-media-player/internal/clock" - "github.com/paul/kiss-media-player/internal/model" - "github.com/paul/kiss-media-player/internal/probe" - "github.com/paul/kiss-media-player/internal/repository" - "github.com/paul/kiss-media-player/internal/thumb" + "codeberg.org/snonux/play/internal/clock" + "codeberg.org/snonux/play/internal/model" + "codeberg.org/snonux/play/internal/probe" + "codeberg.org/snonux/play/internal/repository" + "codeberg.org/snonux/play/internal/thumb" ) // mockDirEntry implements os.DirEntry for tests. @@ -23,10 +23,12 @@ type mockDirEntry struct { isDir bool } -func (m mockDirEntry) Name() string { return m.name } -func (m mockDirEntry) IsDir() bool { return m.isDir } -func (m mockDirEntry) Type() os.FileMode { return 0 } -func (m mockDirEntry) Info() (os.FileInfo, error) { return mockFileInfo{name: m.name, isDir: m.isDir}, nil } +func (m mockDirEntry) Name() string { return m.name } +func (m mockDirEntry) IsDir() bool { return m.isDir } +func (m mockDirEntry) Type() os.FileMode { return 0 } +func (m mockDirEntry) Info() (os.FileInfo, error) { + return mockFileInfo{name: m.name, isDir: m.isDir}, nil +} // mockFileInfo implements os.FileInfo for tests. type mockFileInfo struct { @@ -38,11 +40,11 @@ type mockFileInfo struct { } func (m mockFileInfo) Name() string { return m.name } -func (m mockFileInfo) Size() int64 { return m.size } -func (m mockFileInfo) Mode() os.FileMode { return m.mode } +func (m mockFileInfo) Size() int64 { return m.size } +func (m mockFileInfo) Mode() os.FileMode { return m.mode } func (m mockFileInfo) ModTime() time.Time { return m.modTime } -func (m mockFileInfo) IsDir() bool { return m.isDir } -func (m mockFileInfo) Sys() interface{} { return nil } +func (m mockFileInfo) IsDir() bool { return m.isDir } +func (m mockFileInfo) Sys() interface{} { return nil } // walkEntry describes a single path yielded by mockFS.WalkDir. type walkEntry struct { |
