From bf5b62b69927f281d1e90672cd44e819602fa688 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 18 Jun 2026 12:51:50 -0400 Subject: [PATCH] fix fmt --- internal/appherder/appimage.go | 8 ++++++-- internal/appherder/dwarfs.go | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/appherder/appimage.go b/internal/appherder/appimage.go index b41ba4d..e33235c 100644 --- a/internal/appherder/appimage.go +++ b/internal/appherder/appimage.go @@ -126,7 +126,9 @@ func fileSystemOffset(file io.ReaderAt) (int64, error) { } // isSquashFS reports whether a SquashFS superblock begins at offset. -func isSquashFS(file interface{ ReadAt([]byte, int64) (int, error) }, offset int64) bool { +func isSquashFS(file interface { + ReadAt([]byte, int64) (int, error) +}, offset int64) bool { magic := make([]byte, 4) _, err := file.ReadAt(magic, offset) return err == nil && string(magic) == "hsqs" @@ -134,7 +136,9 @@ func isSquashFS(file interface{ ReadAt([]byte, int64) (int, error) }, offset int // scanForSquashFS searches for a SquashFS superblock in 4096-byte steps over // the next 64 MiB starting from offset. Returns the found position or false. -func scanForSquashFS(file interface{ ReadAt([]byte, int64) (int, error) }, offset int64) (int64, bool) { +func scanForSquashFS(file interface { + ReadAt([]byte, int64) (int, error) +}, offset int64) (int64, bool) { const window = 64 * 1024 * 1024 buf := make([]byte, 4096) for pos := offset; pos < offset+window; pos += 4096 { diff --git a/internal/appherder/dwarfs.go b/internal/appherder/dwarfs.go index ba2a43c..548c303 100644 --- a/internal/appherder/dwarfs.go +++ b/internal/appherder/dwarfs.go @@ -56,7 +56,9 @@ func extractCommand(ctx context.Context, appimagePath, destDir string) *exec.Cmd } // isDwarFS reports whether the payload at offset starts with the DwarFS magic. -func isDwarFS(file interface{ ReadAt([]byte, int64) (int, error) }, offset int64) bool { +func isDwarFS(file interface { + ReadAt([]byte, int64) (int, error) +}, offset int64) bool { magic := make([]byte, 6) _, err := file.ReadAt(magic, offset) return err == nil && string(magic) == "DWARFS" -- 2.51.2