From f1507f7f650e092b9df3f7d64bcded5eb73fb42a Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Tue, 17 Aug 2021 12:06:32 +0200 Subject: [PATCH] mod: Use proper path and dont use replace --- Makefile | 7 +-- format/all/all.go | 54 +++++++++---------- format/ape/ape.go | 6 +-- format/av1/ccr.go | 6 +-- format/av1/frame.go | 6 +-- format/av1/obu.go | 6 +-- format/bzip2/bzip2.go | 9 ++-- format/default.go | 4 +- format/dns/dns.go | 7 +-- format/elf/elf.go | 7 +-- format/flac/flac.go | 9 ++-- format/flac/frame.go | 11 ++-- format/flac/metadatablock.go | 8 +-- format/flac/picture.go | 6 +-- format/flv/flv.go | 6 +-- format/fqtest_test.go | 7 +-- format/fuzz_test.go | 4 +- format/gif/gif.go | 7 +-- format/gzip/gzip.go | 9 ++-- format/icc/profile.go | 7 +-- format/id3/id3v1.go | 7 +-- format/id3/id3v11.go | 6 +-- format/id3/id3v2.go | 7 +-- format/jpeg/jpeg.go | 9 ++-- format/json/json.go | 7 +-- .../ebml_matroska/ebml_matroska_gen.go | 2 +- format/matroska/matroska.go | 13 ++--- format/mp3/mp3.go | 6 +-- format/mp3/xing.go | 6 +-- format/mp4/boxes.go | 5 +- format/mp4/mp4.go | 7 +-- format/mpeg/aac_frame.go | 6 +-- format/mpeg/adts.go | 6 +-- format/mpeg/adts_frame.go | 6 +-- format/mpeg/asc.go | 6 +-- format/mpeg/avc_au.go | 6 +-- format/mpeg/avc_dcr.go | 6 +-- format/mpeg/avc_nalu.go | 8 +-- format/mpeg/avc_pps.go | 6 +-- format/mpeg/avc_sei.go | 6 +-- format/mpeg/avc_sps.go | 6 +-- format/mpeg/es.go | 7 +-- format/mpeg/hevc_au.go | 6 +-- format/mpeg/hevc_dcr.go | 6 +-- format/mpeg/hevc_nalu.go | 6 +-- format/mpeg/mp3_frame.go | 8 +-- format/mpeg/pes.go | 9 ++-- format/mpeg/pes_packet.go | 8 +-- format/mpeg/spu.go | 7 +-- format/mpeg/ts.go | 6 +-- format/ogg/ogg.go | 9 ++-- format/ogg/page.go | 9 ++-- format/opus/opus.go | 7 +-- format/png/png.go | 9 ++-- format/protobuf/protobuf.go | 8 +-- format/protobuf/widevine.go | 6 +-- format/raw/raw.go | 6 +-- format/registry/default.go | 2 +- format/registry/registry.go | 3 +- format/tar/tar.go | 7 +-- format/tiff/exif.go | 6 +-- format/tiff/tiff.go | 6 +-- format/vorbis/comment.go | 9 ++-- format/vorbis/vorbis.go | 7 +-- format/vpx/vp8.go | 6 +-- format/vpx/vp9.go | 6 +-- format/vpx/vp9_cfm.go | 6 +-- format/vpx/vpx_ccr.go | 6 +-- format/wav/wav.go | 7 +-- format/webp/webp.go | 7 +-- go.mod | 14 +++-- go.sum | 8 +-- .../aheadreadseeker/aheadreadseeker_test.go | 3 +- internal/ansi/ansi_test.go | 3 +- internal/asciiwriter/asciiwriter_test.go | 3 +- internal/columnwriter/columnwriter.go | 3 +- internal/columnwriter/columnwriter_test.go | 3 +- internal/ctxreadseeker/ctxreadseek_test.go | 3 +- internal/deepequal/deepequal_test.go | 3 +- internal/gojqextra/gojqextra.go | 5 +- internal/hexdump/hexdump.go | 7 +-- internal/hexdump/hexdump_test.go | 6 +-- internal/hexpairwriter/hexpairwriter.go | 5 +- internal/hexpairwriter/hexpairwriter_test.go | 3 +- internal/num/num.go | 3 +- internal/recoverfn/recoverfn_test.go | 7 +-- internal/shquote/shquote_test.go | 3 +- main.go | 6 +-- pkg/bitio/bitio_test.go | 2 +- pkg/bitio/bitstring_test.go | 3 +- pkg/bitio/buffer_test.go | 3 +- pkg/bitio/reversebytes_test.go | 3 +- pkg/bitio/rw64_test.go | 3 +- pkg/cli/cli.go | 11 ++-- pkg/decode/decode.go | 9 ++-- pkg/decode/decode_readers.go | 3 +- pkg/decode/io.go | 3 +- pkg/decode/numbers.go | 3 +- pkg/decode/value.go | 5 +- pkg/fqtest/fqtest.go | 10 ++-- pkg/fqtest/fqtest_test.go | 5 +- pkg/interp/buffer.go | 7 +-- pkg/interp/completion.go | 2 +- pkg/interp/completion_test.go | 3 +- pkg/interp/decorator.go | 5 +- pkg/interp/dump.go | 13 ++--- pkg/interp/fqtest_test.go | 7 +-- pkg/interp/funcs.go | 19 +++---- pkg/interp/hexdump.go | 11 ++-- pkg/interp/interp.go | 21 ++++---- pkg/interp/preview.go | 7 +-- pkg/interp/value.go | 9 ++-- pkg/ranges/ranges_test.go | 3 +- 113 files changed, 420 insertions(+), 356 deletions(-) diff --git a/Makefile b/Makefile index 0b07b116..2abdae4b 100644 --- a/Makefile +++ b/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 diff --git a/format/all/all.go b/format/all/all.go index 0e74e128..2f504829 100644 --- a/format/all/all.go +++ b/format/all/all.go @@ -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" ) diff --git a/format/ape/ape.go b/format/ape/ape.go index 5b4eec2d..6f1de29e 100644 --- a/format/ape/ape.go +++ b/format/ape/ape.go @@ -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 diff --git a/format/av1/ccr.go b/format/av1/ccr.go index c1b274a6..06ed868b 100644 --- a/format/av1/ccr.go +++ b/format/av1/ccr.go @@ -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() { diff --git a/format/av1/frame.go b/format/av1/frame.go index 033bbd50..144642fa 100644 --- a/format/av1/frame.go +++ b/format/av1/frame.go @@ -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 diff --git a/format/av1/obu.go b/format/av1/obu.go index 062d2088..27e610bc 100644 --- a/format/av1/obu.go +++ b/format/av1/obu.go @@ -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() { diff --git a/format/bzip2/bzip2.go b/format/bzip2/bzip2.go index 698013f0..20276da3 100644 --- a/format/bzip2/bzip2.go +++ b/format/bzip2/bzip2.go @@ -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 diff --git a/format/default.go b/format/default.go index 1186fc11..91284cac 100644 --- a/format/default.go +++ b/format/default.go @@ -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 ( diff --git a/format/dns/dns.go b/format/dns/dns.go index 4da15df9..850c26f0 100644 --- a/format/dns/dns.go +++ b/format/dns/dns.go @@ -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() { diff --git a/format/elf/elf.go b/format/elf/elf.go index 2119671f..370b8805 100644 --- a/format/elf/elf.go +++ b/format/elf/elf.go @@ -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 diff --git a/format/flac/flac.go b/format/flac/flac.go index 66180810..8bd0338c 100644 --- a/format/flac/flac.go +++ b/format/flac/flac.go @@ -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 diff --git a/format/flac/frame.go b/format/flac/frame.go index b1257c7b..ce40a473 100644 --- a/format/flac/frame.go +++ b/format/flac/frame.go @@ -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() { diff --git a/format/flac/metadatablock.go b/format/flac/metadatablock.go index ef7314c9..a72ecd9d 100644 --- a/format/flac/metadatablock.go +++ b/format/flac/metadatablock.go @@ -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 diff --git a/format/flac/picture.go b/format/flac/picture.go index 5b3a41a8..a990bd96 100644 --- a/format/flac/picture.go +++ b/format/flac/picture.go @@ -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 diff --git a/format/flv/flv.go b/format/flv/flv.go index 1f98c734..03177d63 100644 --- a/format/flv/flv.go +++ b/format/flv/flv.go @@ -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() { diff --git a/format/fqtest_test.go b/format/fqtest_test.go index ff0c9d7f..f961d7d4 100644 --- a/format/fqtest_test.go +++ b/format/fqtest_test.go @@ -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) { diff --git a/format/fuzz_test.go b/format/fuzz_test.go index 78c6e8ff..d89e4a5b 100644 --- a/format/fuzz_test.go +++ b/format/fuzz_test.go @@ -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" diff --git a/format/gif/gif.go b/format/gif/gif.go index 8e4781b4..3188597c 100644 --- a/format/gif/gif.go +++ b/format/gif/gif.go @@ -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() { diff --git a/format/gzip/gzip.go b/format/gzip/gzip.go index 691716c9..bf1ba012 100644 --- a/format/gzip/gzip.go +++ b/format/gzip/gzip.go @@ -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 diff --git a/format/icc/profile.go b/format/icc/profile.go index 1bed4108..2f795820 100644 --- a/format/icc/profile.go +++ b/format/icc/profile.go @@ -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() { diff --git a/format/id3/id3v1.go b/format/id3/id3v1.go index 5a25dadd..efa9d239 100644 --- a/format/id3/id3v1.go +++ b/format/id3/id3v1.go @@ -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? diff --git a/format/id3/id3v11.go b/format/id3/id3v11.go index ded602bf..1f32f430 100644 --- a/format/id3/id3v11.go +++ b/format/id3/id3v11.go @@ -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() { diff --git a/format/id3/id3v2.go b/format/id3/id3v2.go index b1fe0b4b..5ba60260 100644 --- a/format/id3/id3v2.go +++ b/format/id3/id3v2.go @@ -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 diff --git a/format/jpeg/jpeg.go b/format/jpeg/jpeg.go index 2b24a05b..d12d788e 100644 --- a/format/jpeg/jpeg.go +++ b/format/jpeg/jpeg.go @@ -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 diff --git a/format/json/json.go b/format/json/json.go index c1faa5f5..a8575faf 100644 --- a/format/json/json.go +++ b/format/json/json.go @@ -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() { diff --git a/format/matroska/ebml_matroska/ebml_matroska_gen.go b/format/matroska/ebml_matroska/ebml_matroska_gen.go index d59a1dbe..78da6f49 100644 --- a/format/matroska/ebml_matroska/ebml_matroska_gen.go +++ b/format/matroska/ebml_matroska/ebml_matroska_gen.go @@ -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}, diff --git a/format/matroska/matroska.go b/format/matroska/matroska.go index a184e139..b6b17c4e 100644 --- a/format/matroska/matroska.go +++ b/format/matroska/matroska.go @@ -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 diff --git a/format/mp3/mp3.go b/format/mp3/mp3.go index 31d383f7..0d040f60 100644 --- a/format/mp3/mp3.go +++ b/format/mp3/mp3.go @@ -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 diff --git a/format/mp3/xing.go b/format/mp3/xing.go index c7abe04b..1d3656f5 100644 --- a/format/mp3/xing.go +++ b/format/mp3/xing.go @@ -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() { diff --git a/format/mp4/boxes.go b/format/mp4/boxes.go index 11df3b64..f2b15ed7 100644 --- a/format/mp4/boxes.go +++ b/format/mp4/boxes.go @@ -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{ diff --git a/format/mp4/mp4.go b/format/mp4/mp4.go index 8723a8fe..6391e2ca 100644 --- a/format/mp4/mp4.go +++ b/format/mp4/mp4.go @@ -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 diff --git a/format/mpeg/aac_frame.go b/format/mpeg/aac_frame.go index ea4a55af..a1595fc6 100644 --- a/format/mpeg/aac_frame.go +++ b/format/mpeg/aac_frame.go @@ -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() { diff --git a/format/mpeg/adts.go b/format/mpeg/adts.go index 5d3589b3..10cf0c94 100644 --- a/format/mpeg/adts.go +++ b/format/mpeg/adts.go @@ -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 diff --git a/format/mpeg/adts_frame.go b/format/mpeg/adts_frame.go index 12a01ea6..8835c277 100644 --- a/format/mpeg/adts_frame.go +++ b/format/mpeg/adts_frame.go @@ -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 diff --git a/format/mpeg/asc.go b/format/mpeg/asc.go index dcd20e64..f7915c31 100644 --- a/format/mpeg/asc.go +++ b/format/mpeg/asc.go @@ -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() { diff --git a/format/mpeg/avc_au.go b/format/mpeg/avc_au.go index b792a798..8aac20c6 100644 --- a/format/mpeg/avc_au.go +++ b/format/mpeg/avc_au.go @@ -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 diff --git a/format/mpeg/avc_dcr.go b/format/mpeg/avc_dcr.go index 63727bfd..93546914 100644 --- a/format/mpeg/avc_dcr.go +++ b/format/mpeg/avc_dcr.go @@ -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 diff --git a/format/mpeg/avc_nalu.go b/format/mpeg/avc_nalu.go index 84ed6e6d..19a906aa 100644 --- a/format/mpeg/avc_nalu.go +++ b/format/mpeg/avc_nalu.go @@ -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 diff --git a/format/mpeg/avc_pps.go b/format/mpeg/avc_pps.go index ba4cfdf6..03453964 100644 --- a/format/mpeg/avc_pps.go +++ b/format/mpeg/avc_pps.go @@ -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() { diff --git a/format/mpeg/avc_sei.go b/format/mpeg/avc_sei.go index 8eb4310a..b4ab4a88 100644 --- a/format/mpeg/avc_sei.go +++ b/format/mpeg/avc_sei.go @@ -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() { diff --git a/format/mpeg/avc_sps.go b/format/mpeg/avc_sps.go index 843d4c7b..dc165f31 100644 --- a/format/mpeg/avc_sps.go +++ b/format/mpeg/avc_sps.go @@ -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() { diff --git a/format/mpeg/es.go b/format/mpeg/es.go index 25c05fd9..fb430dfd 100644 --- a/format/mpeg/es.go +++ b/format/mpeg/es.go @@ -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 diff --git a/format/mpeg/hevc_au.go b/format/mpeg/hevc_au.go index 31d558d0..a42202bf 100644 --- a/format/mpeg/hevc_au.go +++ b/format/mpeg/hevc_au.go @@ -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 diff --git a/format/mpeg/hevc_dcr.go b/format/mpeg/hevc_dcr.go index 0b636f23..b5ddcadf 100644 --- a/format/mpeg/hevc_dcr.go +++ b/format/mpeg/hevc_dcr.go @@ -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 diff --git a/format/mpeg/hevc_nalu.go b/format/mpeg/hevc_nalu.go index ccbc01b2..165a5ced 100644 --- a/format/mpeg/hevc_nalu.go +++ b/format/mpeg/hevc_nalu.go @@ -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() { diff --git a/format/mpeg/mp3_frame.go b/format/mpeg/mp3_frame.go index 5ebfff3f..010e8b14 100644 --- a/format/mpeg/mp3_frame.go +++ b/format/mpeg/mp3_frame.go @@ -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 diff --git a/format/mpeg/pes.go b/format/mpeg/pes.go index 2dd2df79..d1946f1e 100644 --- a/format/mpeg/pes.go +++ b/format/mpeg/pes.go @@ -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 diff --git a/format/mpeg/pes_packet.go b/format/mpeg/pes_packet.go index db46b548..350f4146 100644 --- a/format/mpeg/pes_packet.go +++ b/format/mpeg/pes_packet.go @@ -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() { diff --git a/format/mpeg/spu.go b/format/mpeg/spu.go index f9b66408..ccc0a542 100644 --- a/format/mpeg/spu.go +++ b/format/mpeg/spu.go @@ -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() { diff --git a/format/mpeg/ts.go b/format/mpeg/ts.go index 09a2d47d..3c9b1b98 100644 --- a/format/mpeg/ts.go +++ b/format/mpeg/ts.go @@ -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() { diff --git a/format/ogg/ogg.go b/format/ogg/ogg.go index 398ae961..2f3a295a 100644 --- a/format/ogg/ogg.go +++ b/format/ogg/ogg.go @@ -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 diff --git a/format/ogg/page.go b/format/ogg/page.go index 6488f39a..87400c5a 100644 --- a/format/ogg/page.go +++ b/format/ogg/page.go @@ -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() { diff --git a/format/opus/opus.go b/format/opus/opus.go index b1f29704..c57a7e26 100644 --- a/format/opus/opus.go +++ b/format/opus/opus.go @@ -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 diff --git a/format/png/png.go b/format/png/png.go index 57f3c03c..ef541700 100644 --- a/format/png/png.go +++ b/format/png/png.go @@ -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 diff --git a/format/protobuf/protobuf.go b/format/protobuf/protobuf.go index e6a26371..0186d43f 100644 --- a/format/protobuf/protobuf.go +++ b/format/protobuf/protobuf.go @@ -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() { diff --git a/format/protobuf/widevine.go b/format/protobuf/widevine.go index c82f544f..90479673 100644 --- a/format/protobuf/widevine.go +++ b/format/protobuf/widevine.go @@ -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 diff --git a/format/raw/raw.go b/format/raw/raw.go index 466f2fb0..01bdd3c2 100644 --- a/format/raw/raw.go +++ b/format/raw/raw.go @@ -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() { diff --git a/format/registry/default.go b/format/registry/default.go index dce501b3..f7066084 100644 --- a/format/registry/default.go +++ b/format/registry/default.go @@ -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 diff --git a/format/registry/registry.go b/format/registry/registry.go index 1511cc3e..731d48db 100644 --- a/format/registry/registry.go +++ b/format/registry/registry.go @@ -3,9 +3,10 @@ package registry import ( "errors" "fmt" - "fq/pkg/decode" "sort" "sync" + + "github.com/wader/fq/pkg/decode" ) type Registry struct { diff --git a/format/tar/tar.go b/format/tar/tar.go index 7aa25c64..9d3aec99 100644 --- a/format/tar/tar.go +++ b/format/tar/tar.go @@ -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 diff --git a/format/tiff/exif.go b/format/tiff/exif.go index 72bf0b70..40292597 100644 --- a/format/tiff/exif.go +++ b/format/tiff/exif.go @@ -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 diff --git a/format/tiff/tiff.go b/format/tiff/tiff.go index 4b20ba48..b37e1e8c 100644 --- a/format/tiff/tiff.go +++ b/format/tiff/tiff.go @@ -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 diff --git a/format/vorbis/comment.go b/format/vorbis/comment.go index 7368a532..b646faed 100644 --- a/format/vorbis/comment.go +++ b/format/vorbis/comment.go @@ -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 diff --git a/format/vorbis/vorbis.go b/format/vorbis/vorbis.go index 1030f26f..87752ad7 100644 --- a/format/vorbis/vorbis.go +++ b/format/vorbis/vorbis.go @@ -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 diff --git a/format/vpx/vp8.go b/format/vpx/vp8.go index 2fb9b044..817b4f87 100644 --- a/format/vpx/vp8.go +++ b/format/vpx/vp8.go @@ -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? diff --git a/format/vpx/vp9.go b/format/vpx/vp9.go index 3ffcc97d..a7f14125 100644 --- a/format/vpx/vp9.go +++ b/format/vpx/vp9.go @@ -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? diff --git a/format/vpx/vp9_cfm.go b/format/vpx/vp9_cfm.go index 5381e87d..f5183241 100644 --- a/format/vpx/vp9_cfm.go +++ b/format/vpx/vp9_cfm.go @@ -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() { diff --git a/format/vpx/vpx_ccr.go b/format/vpx/vpx_ccr.go index cc255e7d..4210caf1 100644 --- a/format/vpx/vpx_ccr.go +++ b/format/vpx/vpx_ccr.go @@ -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() { diff --git a/format/wav/wav.go b/format/wav/wav.go index db0e88d2..2b58022d 100644 --- a/format/wav/wav.go +++ b/format/wav/wav.go @@ -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 diff --git a/format/webp/webp.go b/format/webp/webp.go index 41d1bbe1..9ca3ee67 100644 --- a/format/webp/webp.go +++ b/format/webp/webp.go @@ -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 diff --git a/go.mod b/go.mod index 05c91c00..b46c2541 100644 --- a/go.mod +++ b/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 diff --git a/go.sum b/go.sum index 1f028f43..38cbcb0f 100644 --- a/go.sum +++ b/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= diff --git a/internal/aheadreadseeker/aheadreadseeker_test.go b/internal/aheadreadseeker/aheadreadseeker_test.go index e5023c52..0e0d80fd 100644 --- a/internal/aheadreadseeker/aheadreadseeker_test.go +++ b/internal/aheadreadseeker/aheadreadseeker_test.go @@ -2,10 +2,11 @@ package aheadreadseeker_test import ( "bytes" - "fq/internal/aheadreadseeker" "io" "log" "testing" + + "github.com/wader/fq/internal/aheadreadseeker" ) type readRecord struct { diff --git a/internal/ansi/ansi_test.go b/internal/ansi/ansi_test.go index b213586c..ac6689ae 100644 --- a/internal/ansi/ansi_test.go +++ b/internal/ansi/ansi_test.go @@ -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) { diff --git a/internal/asciiwriter/asciiwriter_test.go b/internal/asciiwriter/asciiwriter_test.go index 134cf123..0431c4f9 100644 --- a/internal/asciiwriter/asciiwriter_test.go +++ b/internal/asciiwriter/asciiwriter_test.go @@ -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) { diff --git a/internal/columnwriter/columnwriter.go b/internal/columnwriter/columnwriter.go index 2d504ce4..e344f5ff 100644 --- a/internal/columnwriter/columnwriter.go +++ b/internal/columnwriter/columnwriter.go @@ -2,9 +2,10 @@ package columnwriter import ( "bytes" - "fq/internal/ansi" "io" "strings" + + "github.com/wader/fq/internal/ansi" ) type Column struct { diff --git a/internal/columnwriter/columnwriter_test.go b/internal/columnwriter/columnwriter_test.go index 23e3eb51..6dbcd1d5 100644 --- a/internal/columnwriter/columnwriter_test.go +++ b/internal/columnwriter/columnwriter_test.go @@ -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) { diff --git a/internal/ctxreadseeker/ctxreadseek_test.go b/internal/ctxreadseeker/ctxreadseek_test.go index c3152f9f..9e22bc0f 100644 --- a/internal/ctxreadseeker/ctxreadseek_test.go +++ b/internal/ctxreadseeker/ctxreadseek_test.go @@ -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 { diff --git a/internal/deepequal/deepequal_test.go b/internal/deepequal/deepequal_test.go index 582dd435..b269640d 100644 --- a/internal/deepequal/deepequal_test.go +++ b/internal/deepequal/deepequal_test.go @@ -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{}) diff --git a/internal/gojqextra/gojqextra.go b/internal/gojqextra/gojqextra.go index 889b7d54..36896710 100644 --- a/internal/gojqextra/gojqextra.go +++ b/internal/gojqextra/gojqextra.go @@ -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? diff --git a/internal/hexdump/hexdump.go b/internal/hexdump/hexdump.go index 619cb355..a10b3f86 100644 --- a/internal/hexdump/hexdump.go +++ b/internal/hexdump/hexdump.go @@ -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 { diff --git a/internal/hexdump/hexdump_test.go b/internal/hexdump/hexdump_test.go index 6ecf6531..6385df6e 100644 --- a/internal/hexdump/hexdump_test.go +++ b/internal/hexdump/hexdump_test.go @@ -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" ) diff --git a/internal/hexpairwriter/hexpairwriter.go b/internal/hexpairwriter/hexpairwriter.go index d5ccb3cd..353b8da9 100644 --- a/internal/hexpairwriter/hexpairwriter.go +++ b/internal/hexpairwriter/hexpairwriter.go @@ -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 { diff --git a/internal/hexpairwriter/hexpairwriter_test.go b/internal/hexpairwriter/hexpairwriter_test.go index ab701d5e..41ca3dfa 100644 --- a/internal/hexpairwriter/hexpairwriter_test.go +++ b/internal/hexpairwriter/hexpairwriter_test.go @@ -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) { diff --git a/internal/num/num.go b/internal/num/num.go index d53590c8..324d048c 100644 --- a/internal/num/num.go +++ b/internal/num/num.go @@ -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{ diff --git a/internal/recoverfn/recoverfn_test.go b/internal/recoverfn/recoverfn_test.go index acce3e91..b80c0572 100644 --- a/internal/recoverfn/recoverfn_test.go +++ b/internal/recoverfn/recoverfn_test.go @@ -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) diff --git a/internal/shquote/shquote_test.go b/internal/shquote/shquote_test.go index 308fcaae..ae9244a8 100644 --- a/internal/shquote/shquote_test.go +++ b/internal/shquote/shquote_test.go @@ -1,9 +1,10 @@ package shquote_test import ( - "fq/internal/shquote" "reflect" "testing" + + "github.com/wader/fq/internal/shquote" ) func TestSplit(t *testing.T) { diff --git a/main.go b/main.go index 7aba9f24..9abf5b67 100644 --- a/main.go +++ b/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" diff --git a/pkg/bitio/bitio_test.go b/pkg/bitio/bitio_test.go index cc6239f7..fa8c01c0 100644 --- a/pkg/bitio/bitio_test.go +++ b/pkg/bitio/bitio_test.go @@ -6,7 +6,7 @@ import ( "log" "testing" - "fq/pkg/bitio" + "github.com/wader/fq/pkg/bitio" ) type shortBitReader struct { diff --git a/pkg/bitio/bitstring_test.go b/pkg/bitio/bitstring_test.go index 1a1ca085..4d2f2d18 100644 --- a/pkg/bitio/bitstring_test.go +++ b/pkg/bitio/bitstring_test.go @@ -1,8 +1,9 @@ package bitio_test import ( - "fq/pkg/bitio" "testing" + + "github.com/wader/fq/pkg/bitio" ) func TestBitString(t *testing.T) { diff --git a/pkg/bitio/buffer_test.go b/pkg/bitio/buffer_test.go index 814eb7df..6817e692 100644 --- a/pkg/bitio/buffer_test.go +++ b/pkg/bitio/buffer_test.go @@ -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) { diff --git a/pkg/bitio/reversebytes_test.go b/pkg/bitio/reversebytes_test.go index 7380eed0..c5cb1622 100644 --- a/pkg/bitio/reversebytes_test.go +++ b/pkg/bitio/reversebytes_test.go @@ -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) { diff --git a/pkg/bitio/rw64_test.go b/pkg/bitio/rw64_test.go index 1b17e738..9d6711e4 100644 --- a/pkg/bitio/rw64_test.go +++ b/pkg/bitio/rw64_test.go @@ -4,8 +4,9 @@ import ( "bytes" "encoding/hex" "fmt" - "fq/pkg/bitio" "testing" + + "github.com/wader/fq/pkg/bitio" ) func TestRead64(t *testing.T) { diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 6f2a4c7c..0ade5932 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -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{ diff --git a/pkg/decode/decode.go b/pkg/decode/decode.go index 6ccaaa7e..89d703e8 100644 --- a/pkg/decode/decode.go +++ b/pkg/decode/decode.go @@ -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 { diff --git a/pkg/decode/decode_readers.go b/pkg/decode/decode_readers.go index 28f1d4d0..a3cfc2f3 100644 --- a/pkg/decode/decode_readers.go +++ b/pkg/decode/decode_readers.go @@ -1,8 +1,9 @@ package decode import ( - "fq/pkg/bitio" "io" + + "github.com/wader/fq/pkg/bitio" ) // TODO: FP64,unsigned/BE/LE? rename SFP32? diff --git a/pkg/decode/io.go b/pkg/decode/io.go index 2a302b46..9fe1fbc8 100644 --- a/pkg/decode/io.go +++ b/pkg/decode/io.go @@ -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 { diff --git a/pkg/decode/numbers.go b/pkg/decode/numbers.go index 21b69030..26d3f144 100644 --- a/pkg/decode/numbers.go +++ b/pkg/decode/numbers.go @@ -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" diff --git a/pkg/decode/value.go b/pkg/decode/value.go index 9ebc954d..d5789327 100644 --- a/pkg/decode/value.go +++ b/pkg/decode/value.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 diff --git a/pkg/fqtest/fqtest.go b/pkg/fqtest/fqtest.go index 426be273..0fe5f0ef 100644 --- a/pkg/fqtest/fqtest.go +++ b/pkg/fqtest/fqtest.go @@ -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 { diff --git a/pkg/fqtest/fqtest_test.go b/pkg/fqtest/fqtest_test.go index edfbd6d9..487ad432 100644 --- a/pkg/fqtest/fqtest_test.go +++ b/pkg/fqtest/fqtest_test.go @@ -1,11 +1,12 @@ package fqtest_test import ( - "fq/internal/deepequal" - "fq/pkg/fqtest" "log" "regexp" "testing" + + "github.com/wader/fq/internal/deepequal" + "github.com/wader/fq/pkg/fqtest" ) func TestSectionParser(t *testing.T) { diff --git a/pkg/interp/buffer.go b/pkg/interp/buffer.go index 55772f8e..ebd6a17c 100644 --- a/pkg/interp/buffer.go +++ b/pkg/interp/buffer.go @@ -3,11 +3,12 @@ package interp import ( "bytes" "fmt" - "fq/internal/gojqextra" - "fq/pkg/bitio" - "fq/pkg/ranges" "io" "math/big" + + "github.com/wader/fq/internal/gojqextra" + "github.com/wader/fq/pkg/bitio" + "github.com/wader/fq/pkg/ranges" ) type bufferRange struct { diff --git a/pkg/interp/completion.go b/pkg/interp/completion.go index c7efe2a8..15aede6f 100644 --- a/pkg/interp/completion.go +++ b/pkg/interp/completion.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/itchyny/gojq" + "github.com/wader/gojq" ) type CompletionType string diff --git a/pkg/interp/completion_test.go b/pkg/interp/completion_test.go index aff2516e..e80ed0a9 100644 --- a/pkg/interp/completion_test.go +++ b/pkg/interp/completion_test.go @@ -1,8 +1,9 @@ package interp_test import ( - "fq/pkg/interp" "testing" + + "github.com/wader/fq/pkg/interp" ) func TestBuildCompletionQuery(t *testing.T) { diff --git a/pkg/interp/decorator.go b/pkg/interp/decorator.go index e4d16bd8..845ae354 100644 --- a/pkg/interp/decorator.go +++ b/pkg/interp/decorator.go @@ -1,10 +1,11 @@ package interp import ( - "fq/internal/ansi" - "fq/pkg/decode" "strconv" "strings" + + "github.com/wader/fq/internal/ansi" + "github.com/wader/fq/pkg/decode" ) type stringRanges struct { diff --git a/pkg/interp/dump.go b/pkg/interp/dump.go index 24c0bf29..bf9c9d9b 100644 --- a/pkg/interp/dump.go +++ b/pkg/interp/dump.go @@ -3,15 +3,16 @@ package interp import ( "errors" "fmt" - "fq/internal/asciiwriter" - "fq/internal/columnwriter" - "fq/internal/hexpairwriter" - "fq/internal/num" - "fq/pkg/bitio" - "fq/pkg/decode" "io" "strconv" "strings" + + "github.com/wader/fq/internal/asciiwriter" + "github.com/wader/fq/internal/columnwriter" + "github.com/wader/fq/internal/hexpairwriter" + "github.com/wader/fq/internal/num" + "github.com/wader/fq/pkg/bitio" + "github.com/wader/fq/pkg/decode" ) // 0 12 34 56 diff --git a/pkg/interp/fqtest_test.go b/pkg/interp/fqtest_test.go index 37c51004..def88569 100644 --- a/pkg/interp/fqtest_test.go +++ b/pkg/interp/fqtest_test.go @@ -1,10 +1,11 @@ package interp_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) { diff --git a/pkg/interp/funcs.go b/pkg/interp/funcs.go index f3f1006a..2e8575f3 100644 --- a/pkg/interp/funcs.go +++ b/pkg/interp/funcs.go @@ -10,14 +10,6 @@ import ( "encoding/hex" "errors" "fmt" - "fq/format" - "fq/format/registry" - "fq/internal/aheadreadseeker" - "fq/internal/ctxreadseeker" - "fq/internal/ioextra" - "fq/internal/progressreadseeker" - "fq/pkg/bitio" - "fq/pkg/decode" "hash" "io" "io/fs" @@ -28,7 +20,16 @@ import ( "strings" "time" - "github.com/itchyny/gojq" + "github.com/wader/fq/format" + "github.com/wader/fq/format/registry" + "github.com/wader/fq/internal/aheadreadseeker" + "github.com/wader/fq/internal/ctxreadseeker" + "github.com/wader/fq/internal/ioextra" + "github.com/wader/fq/internal/progressreadseeker" + "github.com/wader/fq/pkg/bitio" + "github.com/wader/fq/pkg/decode" + + "github.com/wader/gojq" ) // TODO: make it nicer somehow? generate generators? remove from struct? diff --git a/pkg/interp/hexdump.go b/pkg/interp/hexdump.go index 377a3b8d..6bd0cfd5 100644 --- a/pkg/interp/hexdump.go +++ b/pkg/interp/hexdump.go @@ -1,12 +1,13 @@ package interp import ( - "fq/internal/asciiwriter" - "fq/internal/hexdump" - "fq/internal/hexpairwriter" - "fq/internal/num" - "fq/pkg/bitio" "io" + + "github.com/wader/fq/internal/asciiwriter" + "github.com/wader/fq/internal/hexdump" + "github.com/wader/fq/internal/hexpairwriter" + "github.com/wader/fq/internal/num" + "github.com/wader/fq/pkg/bitio" ) func hexdumpRange(bbr bufferRange, w io.Writer, opts Options) error { diff --git a/pkg/interp/interp.go b/pkg/interp/interp.go index d3d3f85c..eb6e020d 100644 --- a/pkg/interp/interp.go +++ b/pkg/interp/interp.go @@ -9,15 +9,6 @@ import ( "encoding/hex" "errors" "fmt" - "fq/format/registry" - "fq/internal/ansi" - "fq/internal/colorjson" - "fq/internal/ctxstack" - "fq/internal/num" - "fq/internal/pos" - "fq/pkg/bitio" - "fq/pkg/decode" - "fq/pkg/ranges" "io" "io/fs" "math/big" @@ -26,7 +17,17 @@ import ( "strings" "time" - "github.com/itchyny/gojq" + "github.com/wader/fq/format/registry" + "github.com/wader/fq/internal/ansi" + "github.com/wader/fq/internal/colorjson" + "github.com/wader/fq/internal/ctxstack" + "github.com/wader/fq/internal/num" + "github.com/wader/fq/internal/pos" + "github.com/wader/fq/pkg/bitio" + "github.com/wader/fq/pkg/decode" + "github.com/wader/fq/pkg/ranges" + + "github.com/wader/gojq" ) //go:embed interp.jq diff --git a/pkg/interp/preview.go b/pkg/interp/preview.go index 743508a4..3f476948 100644 --- a/pkg/interp/preview.go +++ b/pkg/interp/preview.go @@ -3,13 +3,14 @@ package interp import ( "encoding/hex" "fmt" - "fq/internal/num" - "fq/pkg/bitio" - "fq/pkg/decode" "io" "sort" "strconv" "strings" + + "github.com/wader/fq/internal/num" + "github.com/wader/fq/pkg/bitio" + "github.com/wader/fq/pkg/decode" ) type previewNode struct { diff --git a/pkg/interp/value.go b/pkg/interp/value.go index b3d3f8c0..18deeced 100644 --- a/pkg/interp/value.go +++ b/pkg/interp/value.go @@ -4,14 +4,15 @@ import ( "bytes" "errors" "fmt" - "fq/internal/gojqextra" - "fq/pkg/bitio" - "fq/pkg/decode" "io" "math/big" "strings" - "github.com/itchyny/gojq" + "github.com/wader/fq/internal/gojqextra" + "github.com/wader/fq/pkg/bitio" + "github.com/wader/fq/pkg/decode" + + "github.com/wader/gojq" ) type expectedExtkeyError struct { diff --git a/pkg/ranges/ranges_test.go b/pkg/ranges/ranges_test.go index 454a967f..d8d596e6 100644 --- a/pkg/ranges/ranges_test.go +++ b/pkg/ranges/ranges_test.go @@ -2,9 +2,10 @@ package ranges_test import ( "fmt" - "fq/pkg/ranges" "reflect" "testing" + + "github.com/wader/fq/pkg/ranges" ) func TestRangeGaps(t *testing.T) {