From 3305bbb7ac7bdba92674c044fc8f03e0c3a8d507 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 2 Jun 2021 13:00:14 +0200 Subject: [PATCH] fix(archive): format issue indentation --- matchers/archive.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/matchers/archive.go b/matchers/archive.go index 978796f..ee618a9 100644 --- a/matchers/archive.go +++ b/matchers/archive.go @@ -191,21 +191,21 @@ func MachO(buf []byte) bool { // There are two frame formats defined by Zstandard: Zstandard frames and Skippable frames. // See more details from https://tools.ietf.org/id/draft-kucherawy-dispatch-zstd-00.html#rfc.section.2 func Zst(buf []byte) bool { - if compareBytes(buf, zstdMagic, 0) { - return true - } else { + if compareBytes(buf, zstdMagic, 0) { + return true + } else { // skippable frames if len(buf) < 8 { return false } - if binary.LittleEndian.Uint32(buf[:4]) & ZstdMagicSkippableMask == ZstdMagicSkippableStart { - userDataLength := binary.LittleEndian.Uint32(buf[4:8]) - if len(buf) < 8 + int(userDataLength) { - return false + if binary.LittleEndian.Uint32(buf[:4]) & ZstdMagicSkippableMask == ZstdMagicSkippableStart { + userDataLength := binary.LittleEndian.Uint32(buf[4:8]) + if len(buf) < 8 + int(userDataLength) { + return false } - nextFrame := buf[8+userDataLength:] - return Zst(nextFrame) - } - return false - } + nextFrame := buf[8+userDataLength:] + return Zst(nextFrame) + } + return false + } }