mirror of
https://github.com/wader/fq.git
synced 2025-01-03 11:02:51 +03:00
mod: Use proper path and dont use replace
This commit is contained in:
parent
1436fdc8ba
commit
f1507f7f65
7
Makefile
7
Makefile
@ -70,6 +70,7 @@ cpuprof: prof
|
||||
go tool pprof -http :5555 fq.prof fq.cpu.prof
|
||||
|
||||
.PHONY: update-gomodreplace
|
||||
update-gomodreplace:
|
||||
go mod edit -replace github.com/chzyer/readline=github.com/wader/readline@fq && GOPROXY=direct go mod download github.com/chzyer/readline && go mod tidy
|
||||
go mod edit -replace github.com/itchyny/gojq=github.com/wader/gojq@fq && GOPROXY=direct go mod download github.com/itchyny/gojq && go mod tidy
|
||||
update-gomod:
|
||||
GOPROXY=direct go get -d github.com/wader/readline@fq
|
||||
GOPROXY=direct go get -d github.com/wader/gojq@fq
|
||||
go mod tidy
|
||||
|
@ -2,31 +2,31 @@
|
||||
package all
|
||||
|
||||
import (
|
||||
_ "fq/format/ape"
|
||||
_ "fq/format/av1"
|
||||
_ "fq/format/bzip2"
|
||||
_ "fq/format/dns"
|
||||
_ "fq/format/elf"
|
||||
_ "fq/format/flac"
|
||||
_ "fq/format/gif"
|
||||
_ "fq/format/gzip"
|
||||
_ "fq/format/icc"
|
||||
_ "fq/format/id3"
|
||||
_ "fq/format/jpeg"
|
||||
_ "fq/format/json"
|
||||
_ "fq/format/matroska"
|
||||
_ "fq/format/mp3"
|
||||
_ "fq/format/mp4"
|
||||
_ "fq/format/mpeg"
|
||||
_ "fq/format/ogg"
|
||||
_ "fq/format/opus"
|
||||
_ "fq/format/png"
|
||||
_ "fq/format/protobuf"
|
||||
_ "fq/format/raw"
|
||||
_ "fq/format/tar"
|
||||
_ "fq/format/tiff"
|
||||
_ "fq/format/vorbis"
|
||||
_ "fq/format/vpx"
|
||||
_ "fq/format/wav"
|
||||
_ "fq/format/webp"
|
||||
_ "github.com/wader/fq/format/ape"
|
||||
_ "github.com/wader/fq/format/av1"
|
||||
_ "github.com/wader/fq/format/bzip2"
|
||||
_ "github.com/wader/fq/format/dns"
|
||||
_ "github.com/wader/fq/format/elf"
|
||||
_ "github.com/wader/fq/format/flac"
|
||||
_ "github.com/wader/fq/format/gif"
|
||||
_ "github.com/wader/fq/format/gzip"
|
||||
_ "github.com/wader/fq/format/icc"
|
||||
_ "github.com/wader/fq/format/id3"
|
||||
_ "github.com/wader/fq/format/jpeg"
|
||||
_ "github.com/wader/fq/format/json"
|
||||
_ "github.com/wader/fq/format/matroska"
|
||||
_ "github.com/wader/fq/format/mp3"
|
||||
_ "github.com/wader/fq/format/mp4"
|
||||
_ "github.com/wader/fq/format/mpeg"
|
||||
_ "github.com/wader/fq/format/ogg"
|
||||
_ "github.com/wader/fq/format/opus"
|
||||
_ "github.com/wader/fq/format/png"
|
||||
_ "github.com/wader/fq/format/protobuf"
|
||||
_ "github.com/wader/fq/format/raw"
|
||||
_ "github.com/wader/fq/format/tar"
|
||||
_ "github.com/wader/fq/format/tiff"
|
||||
_ "github.com/wader/fq/format/vorbis"
|
||||
_ "github.com/wader/fq/format/vpx"
|
||||
_ "github.com/wader/fq/format/wav"
|
||||
_ "github.com/wader/fq/format/webp"
|
||||
)
|
||||
|
@ -4,9 +4,9 @@ package ape
|
||||
// TODO: havent been tested after refactor
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var imageFormat []*decode.Format
|
||||
|
@ -5,9 +5,9 @@ package av1
|
||||
// https://cdn.rawgit.com/AOMediaCodec/av1-isobmff/v1.0.0/
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -5,9 +5,9 @@ package av1
|
||||
// "The OBUs in the Block follow the [Low Overhead Bitstream Format syntax]. They MUST have the [obu_has_size_field] set to 1 except for the last OBU in the frame, for which [obu_has_size_field] MAY be set to 0, in which case it is assumed to fill the remainder of the frame."
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var obuFormat []*decode.Format
|
||||
|
@ -1,9 +1,9 @@
|
||||
package av1
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -8,12 +8,13 @@ package bzip2
|
||||
import (
|
||||
"bytes"
|
||||
"compress/bzip2"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/decode"
|
||||
"hash/crc32"
|
||||
"io"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var probeFormat []*decode.Format
|
||||
|
@ -1,8 +1,8 @@
|
||||
package format
|
||||
|
||||
import (
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/ranges"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -4,10 +4,11 @@ package dns
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -5,10 +5,11 @@ package elf
|
||||
// https://github.com/torvalds/linux/blob/master/include/uapi/linux/elf.h
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
// TODO: p_type hi/lo
|
||||
|
@ -9,10 +9,11 @@ import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/internal/num"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/internal/num"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var flacMetadatablockFormat []*decode.Format
|
||||
|
@ -5,12 +5,13 @@ package flac
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/internal/num"
|
||||
"fq/pkg/crc"
|
||||
"fq/pkg/decode"
|
||||
"math/bits"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/internal/num"
|
||||
"github.com/wader/fq/pkg/crc"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -3,10 +3,10 @@ package flac
|
||||
// TODO: 24 bit picture length truncate warning
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"fq/pkg/ranges"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
var flacPicture []*decode.Format
|
||||
|
@ -1,9 +1,9 @@
|
||||
package flac
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var images []*decode.Format
|
||||
|
@ -7,9 +7,9 @@ package flv
|
||||
// https://www.adobe.com/content/dam/acom/en/devnet/flv/video_file_format_spec_v10.pdf
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,10 +1,11 @@
|
||||
package format_test
|
||||
|
||||
import (
|
||||
_ "fq/format/all"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/fqtest"
|
||||
"testing"
|
||||
|
||||
_ "github.com/wader/fq/format/all"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/fqtest"
|
||||
)
|
||||
|
||||
func TestFQTests(t *testing.T) {
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
_ "fq/format/all"
|
||||
"fq/pkg/interp"
|
||||
_ "github.com/wader/fq/format/all"
|
||||
"github.com/wader/fq/pkg/interp"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
@ -10,9 +10,10 @@ package gif
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -8,12 +8,13 @@ package gz
|
||||
import (
|
||||
"bytes"
|
||||
"compress/flate"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/decode"
|
||||
"hash/crc32"
|
||||
"io"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var probeFormat []*decode.Format
|
||||
|
@ -4,10 +4,11 @@ package icc
|
||||
// https://www.color.org/icc32.pdf
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,10 +1,11 @@
|
||||
package id3
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
// TODO: trim strings?
|
||||
|
@ -1,9 +1,9 @@
|
||||
package id3
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -8,11 +8,12 @@ package id3
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var imageFormat []*decode.Format
|
||||
|
@ -8,10 +8,11 @@ package jpeg
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var exifFormat []*decode.Format
|
||||
|
@ -2,9 +2,10 @@ package json
|
||||
|
||||
import (
|
||||
stdjson "encoding/json"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code below generated from ebml_matroska.xml
|
||||
package ebml_matroska
|
||||
|
||||
import "fq/format/matroska/ebml"
|
||||
import "github.com/wader/fq/format/matroska/ebml"
|
||||
|
||||
var Root = ebml.Tag{
|
||||
ebml.HeaderID: {Name: "EBML", Type: ebml.Master, Tag: ebml.Header},
|
||||
|
@ -16,12 +16,13 @@ package matroska
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/matroska/ebml"
|
||||
"fq/format/matroska/ebml_matroska"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"fq/pkg/ranges"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/matroska/ebml"
|
||||
"github.com/wader/fq/format/matroska/ebml_matroska"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
//go:embed *.jq
|
||||
|
@ -5,9 +5,9 @@ package mp3
|
||||
// TODO: mime audio/mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var headerFormat []*decode.Format
|
||||
|
@ -3,9 +3,9 @@ package mp3
|
||||
// https://www.codeproject.com/Articles/8295/MPEG-Audio-Frame-Header
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -3,10 +3,11 @@ package mp4
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var boxAliases = map[string]string{
|
||||
|
@ -21,10 +21,11 @@ package mp4
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"sort"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
//go:embed *.jq
|
||||
|
@ -6,9 +6,9 @@ package mpeg
|
||||
// ISO/IEC 14496-3
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var adtsFrame []*decode.Format
|
||||
|
@ -9,9 +9,9 @@ package mpeg
|
||||
// https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/aac_adtstoasc_bsf.c
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var aacFrameFormat []*decode.Format
|
||||
|
@ -3,9 +3,9 @@ package mpeg
|
||||
// https://wiki.multimedia.cx/index.php/MPEG-4_Audio
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -3,9 +3,9 @@ package mpeg
|
||||
// ISO/IEC 14496-15, 5.3.3.1.2 Syntax
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var avcNALUFormat []*decode.Format
|
||||
|
@ -8,9 +8,9 @@ package mpeg
|
||||
// TODO: nal unescape function?
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var avcDCRNALFormat []*decode.Format
|
||||
|
@ -4,10 +4,10 @@ package mpeg
|
||||
// TODO: naming
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/internal/num"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/internal/num"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var avcSPSFormat []*decode.Format
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -4,9 +4,9 @@ package mpeg
|
||||
// ISO_IEC_14496-10 AVC
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -2,9 +2,10 @@ package mpeg
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var mpegASCFormat []*decode.Format
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var hevcAUNALFormat []*decode.Format
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var hevcDCRNALFormat []*decode.Format
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -13,10 +13,10 @@ package mpeg
|
||||
// TODO: if only layer 3, assert it
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/crc"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/crc"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var xingHeader []*decode.Format
|
||||
|
@ -6,11 +6,12 @@ package mpeg
|
||||
// http://dvdnav.mplayerhq.hu/dvdinfo/mpeghdrs.html
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/decode"
|
||||
"log"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var pesPacketFormat []*decode.Format
|
||||
|
@ -4,10 +4,10 @@ package mpeg
|
||||
// http://stnsoft.com/DVD/sys_hdr.html))
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -6,10 +6,11 @@ package mpeg
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mpeg
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -5,10 +5,11 @@ package ogg
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var oggPage []*decode.Format
|
||||
|
@ -4,10 +4,11 @@ package ogg
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/crc"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/crc"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -4,9 +4,10 @@ package opus
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var vorbisComment []*decode.Format
|
||||
|
@ -7,11 +7,12 @@ package png
|
||||
// TODO: image/png
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"fq/pkg/ranges"
|
||||
"hash/crc32"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
var iccProfileFormat []*decode.Format
|
||||
|
@ -1,10 +1,10 @@
|
||||
package protobuf
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/internal/num"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/internal/num"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -3,9 +3,9 @@ package protobuf
|
||||
// TODO: move? make collection on known protobuf messages?
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var widevineProtoBufFormat []*decode.Format
|
||||
|
@ -1,9 +1,9 @@
|
||||
package raw
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package registry
|
||||
|
||||
import (
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
// Default global registry that all standard formats register with
|
||||
|
@ -3,9 +3,10 @@ package registry
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fq/pkg/decode"
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
type Registry struct {
|
||||
|
@ -7,11 +7,12 @@ package tar
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var probeFormat []*decode.Format
|
||||
|
@ -3,9 +3,9 @@ package tiff
|
||||
// https://exiftool.org/TagNames/EXIF.html
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
// currently just a alias for tiff
|
||||
|
@ -4,9 +4,9 @@ package tiff
|
||||
// TODO: image/tiff
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var tiffIccProfile []*decode.Format
|
||||
|
@ -2,11 +2,12 @@ package vorbis
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var flacPicture []*decode.Format
|
||||
|
@ -6,9 +6,10 @@ package vorbis
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var vorbisComment []*decode.Format
|
||||
|
@ -3,9 +3,9 @@ package vpx
|
||||
// https://tools.ietf.org/html/rfc6386
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
// TODO: vpx frame?
|
||||
|
@ -3,9 +3,9 @@ package vpx
|
||||
// https://storage.googleapis.com/downloads.webmproject.org/docs/vp9/vp9-bitstream-specification-v0.6-20160331-draft.pdf
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
// TODO: vpx frame?
|
||||
|
@ -3,9 +3,9 @@ package vpx
|
||||
// https://www.webmproject.org/docs/container/#vp9-codec-feature-metadata-codecprivate
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -3,9 +3,9 @@ package vpx
|
||||
// https://www.webmproject.org/vp9/mp4/
|
||||
|
||||
import (
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -8,10 +8,11 @@ package wav
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var headerFormat []*decode.Format
|
||||
|
@ -5,10 +5,11 @@ package webp
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/format"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/decode"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
)
|
||||
|
||||
var vp8Frame []*decode.Format
|
||||
|
14
go.mod
14
go.mod
@ -1,16 +1,14 @@
|
||||
module fq
|
||||
module github.com/wader/fq
|
||||
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/chzyer/readline v1.5.0
|
||||
github.com/itchyny/gojq v0.12.1-0.20210219205417-8d3017ec07d3
|
||||
|
||||
// bump: go-difflib /github.com\/pmezard\/go-difflib v(.*)/ git://github.com/pmezard/go-difflib|^1
|
||||
// bump: go-difflib command go get -d github.com/pmezard/go-difflib@v$LATEST && go mod tidy
|
||||
github.com/pmezard/go-difflib v1.0.0
|
||||
|
||||
// fork of github.com/itchyny/gojq
|
||||
github.com/wader/gojq v0.12.1-0.20210817094547-d804391f5b91
|
||||
// fork of github.com/chzyer/readline
|
||||
github.com/wader/readline v0.0.0-20210817095433-c868eb04b8b2
|
||||
)
|
||||
|
||||
replace github.com/chzyer/readline => github.com/wader/readline v0.0.0-20210708114437-6e459499aaf5
|
||||
|
||||
replace github.com/itchyny/gojq => github.com/wader/gojq v0.12.1-0.20210816164421-ae196e531d8c
|
||||
|
8
go.sum
8
go.sum
@ -13,10 +13,10 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJ
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/wader/gojq v0.12.1-0.20210816164421-ae196e531d8c h1:4GlOuPBD+PW0cHJVqPmYtIyofQcbWaDv44QoDsmIgNo=
|
||||
github.com/wader/gojq v0.12.1-0.20210816164421-ae196e531d8c/go.mod h1:EQUSKgW/YaOxmXpAwGiowFDO4i2Rmtk5+9dFyeiymAg=
|
||||
github.com/wader/readline v0.0.0-20210708114437-6e459499aaf5 h1:lNbk3zDwMc1TaNGWiKrSxCep6R8qqu9CGWBqSFD/9sE=
|
||||
github.com/wader/readline v0.0.0-20210708114437-6e459499aaf5/go.mod h1:1n88xxtpWULehIaVFcn5JQJy3RUe/5pvJznoiKWfKng=
|
||||
github.com/wader/gojq v0.12.1-0.20210817094547-d804391f5b91 h1:WS309mjR6nkIm9975yQ6LQlfU0TfmY18wfvT6xFLi+s=
|
||||
github.com/wader/gojq v0.12.1-0.20210817094547-d804391f5b91/go.mod h1:SRZca2YrBD2GjTLr/VCZvtZ+uaY1jMPwsdWCqns/Gtw=
|
||||
github.com/wader/readline v0.0.0-20210817095433-c868eb04b8b2 h1:MGg7fsdEsoi7rattHGyU21wpOPeL3FonbUbJibpPBxc=
|
||||
github.com/wader/readline v0.0.0-20210817095433-c868eb04b8b2/go.mod h1:jYXyt9wQg3DifxQ8FM5M/ZoskO23GIwmo05QLHtO9CQ=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210601080250-7ecdf8ef093b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
@ -2,10 +2,11 @@ package aheadreadseeker_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/internal/aheadreadseeker"
|
||||
"io"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/aheadreadseeker"
|
||||
)
|
||||
|
||||
type readRecord struct {
|
||||
|
@ -3,9 +3,10 @@ package ansi_test
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/internal/ansi"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/ansi"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) {
|
||||
|
@ -2,9 +2,10 @@ package asciiwriter_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/internal/asciiwriter"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/asciiwriter"
|
||||
)
|
||||
|
||||
func TestWrite(t *testing.T) {
|
||||
|
@ -2,9 +2,10 @@ package columnwriter
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/internal/ansi"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/internal/ansi"
|
||||
)
|
||||
|
||||
type Column struct {
|
||||
|
@ -2,9 +2,10 @@ package columnwriter_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/internal/columnwriter"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/columnwriter"
|
||||
)
|
||||
|
||||
func TestColumnWriter(t *testing.T) {
|
||||
|
@ -4,12 +4,13 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fq/internal/ctxreadseeker"
|
||||
"io"
|
||||
"reflect"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/wader/fq/internal/ctxreadseeker"
|
||||
)
|
||||
|
||||
type rwcRecorder struct {
|
||||
|
@ -2,8 +2,9 @@ package deepequal_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/internal/deepequal"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/deepequal"
|
||||
)
|
||||
|
||||
type tfFn func(format string, args ...interface{})
|
||||
|
@ -4,9 +4,10 @@ package gojqextra
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/internal/colorjson"
|
||||
|
||||
"github.com/itchyny/gojq"
|
||||
"github.com/wader/fq/internal/colorjson"
|
||||
|
||||
"github.com/wader/gojq"
|
||||
)
|
||||
|
||||
// TODO: refactor to use errors from gojq?
|
||||
|
@ -1,11 +1,12 @@
|
||||
package hexdump
|
||||
|
||||
import (
|
||||
"fq/internal/columnwriter"
|
||||
"fq/internal/num"
|
||||
"fq/pkg/bitio"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/internal/columnwriter"
|
||||
"github.com/wader/fq/internal/num"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
type Dumper struct {
|
||||
|
@ -6,9 +6,9 @@ package hexdump_test
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/internal/asciiwriter"
|
||||
"fq/internal/hexdump"
|
||||
"fq/internal/hexpairwriter"
|
||||
"github.com/wader/fq/internal/asciiwriter"
|
||||
"github.com/wader/fq/internal/hexdump"
|
||||
"github.com/wader/fq/internal/hexpairwriter"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -3,9 +3,10 @@ package hexpairwriter
|
||||
// TODO: generalize and rename? make buffer more flexible
|
||||
|
||||
import (
|
||||
"fq/internal/num"
|
||||
"fq/pkg/bitio"
|
||||
"io"
|
||||
|
||||
"github.com/wader/fq/internal/num"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
type Writer struct {
|
||||
|
@ -2,9 +2,10 @@ package hexpairwriter_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/internal/hexpairwriter"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/hexpairwriter"
|
||||
)
|
||||
|
||||
func TestWrite(t *testing.T) {
|
||||
|
@ -2,10 +2,11 @@ package num
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/pkg/ranges"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
var BasePrefixMap = map[int]string{
|
||||
|
@ -1,9 +1,10 @@
|
||||
package recoverfn_test
|
||||
|
||||
import (
|
||||
"fq/internal/recoverfn"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/recoverfn"
|
||||
)
|
||||
|
||||
func test1() {
|
||||
@ -43,13 +44,13 @@ func TestPanic(t *testing.T) {
|
||||
t.Errorf("expected len(frames) %v, got %v", actualFramesLen, actualFramesLen)
|
||||
}
|
||||
|
||||
expectedFrame0Function := "fq/internal/recoverfn_test.test1"
|
||||
expectedFrame0Function := "github.com/wader/fq/internal/recoverfn_test.test1"
|
||||
actualFrame0Function := frames[0].Function
|
||||
if !reflect.DeepEqual(expectedFrame0Function, actualFrame0Function) {
|
||||
t.Errorf("expected frames[0].Function %v, got %v", expectedFrame0Function, actualFrame0Function)
|
||||
}
|
||||
|
||||
expectedFrame1Function := "fq/internal/recoverfn_test.test2"
|
||||
expectedFrame1Function := "github.com/wader/fq/internal/recoverfn_test.test2"
|
||||
actualFrame1Function := frames[1].Function
|
||||
if !reflect.DeepEqual(expectedFrame1Function, actualFrame1Function) {
|
||||
t.Errorf("expected frames[1].Function %v, got %v", expectedFrame1Function, actualFrame1Function)
|
||||
|
@ -1,9 +1,10 @@
|
||||
package shquote_test
|
||||
|
||||
import (
|
||||
"fq/internal/shquote"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/internal/shquote"
|
||||
)
|
||||
|
||||
func TestSplit(t *testing.T) {
|
||||
|
6
main.go
6
main.go
@ -1,9 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "fq/format/all"
|
||||
"fq/format/registry"
|
||||
"fq/pkg/cli"
|
||||
_ "github.com/wader/fq/format/all"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/pkg/cli"
|
||||
)
|
||||
|
||||
var version = "dev"
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
type shortBitReader struct {
|
||||
|
@ -1,8 +1,9 @@
|
||||
package bitio_test
|
||||
|
||||
import (
|
||||
"fq/pkg/bitio"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
func TestBitString(t *testing.T) {
|
||||
|
@ -4,10 +4,11 @@ package bitio_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/pkg/bitio"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
func TestBufferBitString(t *testing.T) {
|
||||
|
@ -3,8 +3,9 @@ package bitio_test
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"fq/pkg/bitio"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
func TestReverseBytes(t *testing.T) {
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"fq/pkg/bitio"
|
||||
"testing"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
func TestRead64(t *testing.T) {
|
||||
|
@ -5,9 +5,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fq/format/registry"
|
||||
"fq/internal/profile"
|
||||
"fq/pkg/interp"
|
||||
"io"
|
||||
"io/fs"
|
||||
"log"
|
||||
@ -15,7 +12,11 @@ import (
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/chzyer/readline"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/internal/profile"
|
||||
"github.com/wader/fq/pkg/interp"
|
||||
|
||||
"github.com/wader/readline"
|
||||
)
|
||||
|
||||
func MaybeProfile() func() {
|
||||
@ -123,7 +124,7 @@ func (o *standardOS) Readline(prompt string, complete func(line string, pos int)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
historyFile = filepath.Join(cacheDir, "fq/history")
|
||||
historyFile = filepath.Join(cacheDir, "github.com/wader/fq/history")
|
||||
_ = os.MkdirAll(filepath.Dir(historyFile), 0700)
|
||||
|
||||
o.rl, err = readline.NewEx(&readline.Config{
|
||||
|
@ -7,12 +7,13 @@ import (
|
||||
"compress/zlib"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"fq/internal/num"
|
||||
"fq/internal/recoverfn"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/ranges"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"github.com/wader/fq/internal/num"
|
||||
"github.com/wader/fq/internal/recoverfn"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
type DecodeFormatsError struct {
|
||||
|
@ -1,8 +1,9 @@
|
||||
package decode
|
||||
|
||||
import (
|
||||
"fq/pkg/bitio"
|
||||
"io"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
// TODO: FP64,unsigned/BE/LE? rename SFP32?
|
||||
|
@ -2,8 +2,9 @@ package decode
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fq/pkg/bitio"
|
||||
"io"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
func MustCopy(r io.Writer, w io.Reader) int64 {
|
||||
|
@ -2,9 +2,10 @@ package decode
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fq/pkg/bitio"
|
||||
"math"
|
||||
"strconv"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
)
|
||||
|
||||
//go:generate sh -c "cat numbers.go.tmpl | go run ../../dev/tmpl.go numbers.go.json | gofmt > numbers_gen.go"
|
||||
|
@ -2,9 +2,10 @@ package decode
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/ranges"
|
||||
"sort"
|
||||
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
type DisplayFormat int
|
||||
|
@ -16,11 +16,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"fq/format/registry"
|
||||
"fq/internal/deepequal"
|
||||
"fq/internal/shquote"
|
||||
"fq/pkg/bitio"
|
||||
"fq/pkg/interp"
|
||||
"github.com/wader/fq/format/registry"
|
||||
"github.com/wader/fq/internal/deepequal"
|
||||
"github.com/wader/fq/internal/shquote"
|
||||
"github.com/wader/fq/pkg/bitio"
|
||||
"github.com/wader/fq/pkg/interp"
|
||||
)
|
||||
|
||||
type testCaseReadline struct {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user