refactor: remove dead code across server, templ pages, and client modules
Deadcode-verified removals (RTA reachability from main, cross-checked with -test and textual xrefs): Go server: - whole files: middleware/transaction.go, middleware/error_handler.go, middleware/password_validator.go (live registration machinery kept), handlers/sync.go, sync/offline.go - unrouted endpoints: auth UpdateUsername/UpdateEmail, timezone settings handler, OPDS RegisterOPDS, Kobo LibrarySync handler, ReaderHandler.ShowReader, JSON-data twins on collections/library - duplicate book-matching handlers (book_matching.go Handler twins, matching.go MatchingHandler twins), superseded helpers (router.parseUUID, handlers.ValidateDeviceToken, normalizePath, userExists, generateLockID) Templ/client: - never-routed pages: api_explorer.templ, queue.templ and their client modules api-explorer.ts, api-explorer-docs.ts, queue.ts - fully orphaned wrapper modules events.ts, dom.ts - broken clearSyncQueue (called a nonexistent endpoint) and the hidden, never-populated sync-queue section on the devices page - 166+ unused exports demoted to private (knip-verified); ~85 truly dead declarations removed via tsc noUnusedLocals fixpoint - stale 'interactive API Explorer' claims dropped from docs The docs drift-gate package (internal/docs), templ-bound modules (dashboard, stats, header, index, login, profile*, bookshelf, collections, toast-error), sqlc-generated code, and web/static are intentionally untouched.
This commit is contained in:
1 parent
8733e83f1f
commit
8631aa00bf
107 files changed
+689
-3443
No files matched your search
@@ -295,30 +295,6 @@ func OpenReader(name string) (*ReadCloser, error) {
|
||||
return OpenReaderWithPassword(name, "")
|
||||
}
|
||||
|
||||
// NewReaderWithPassword returns a new [*Reader] reading from r using password
|
||||
// as the basis of the decryption key, which is assumed to have the given size
|
||||
// in bytes.
|
||||
func NewReaderWithPassword(r io.ReaderAt, size int64, password string) (*Reader, error) {
|
||||
if size < 0 {
|
||||
return nil, errNegativeSize
|
||||
}
|
||||
|
||||
zr := new(Reader)
|
||||
zr.p = password
|
||||
|
||||
if err := zr.init(r, size); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return zr, nil
|
||||
}
|
||||
|
||||
// NewReader returns a new [*Reader] reading from r, which is assumed to have
|
||||
// the given size in bytes.
|
||||
func NewReader(r io.ReaderAt, size int64) (*Reader, error) {
|
||||
return NewReaderWithPassword(r, size, "")
|
||||
}
|
||||
|
||||
func (z *Reader) folderReader(si *streamsInfo, f int) (*folderReadCloser, uint32, bool, error) {
|
||||
// Create a SectionReader covering all of the streams data
|
||||
return si.FolderReader(io.NewSectionReader(z.r, z.start, z.end-z.start), f, z.p)
|
||||
@@ -568,17 +544,6 @@ func (z *Reader) init(r io.ReaderAt, size int64) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Volumes returns the list of volumes that have been opened as part of the
|
||||
// current archive.
|
||||
func (rc *ReadCloser) Volumes() []string {
|
||||
volumes := make([]string, len(rc.f))
|
||||
for idx, f := range rc.f {
|
||||
volumes[idx] = f.Name()
|
||||
}
|
||||
|
||||
return volumes
|
||||
}
|
||||
|
||||
// Close closes the 7-zip file or volumes, rendering them unusable for I/O.
|
||||
func (rc *ReadCloser) Close() error {
|
||||
errs := make([]error, 0, len(rc.f))
|
||||
|
||||
Reference in new issue
Block a user