1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 18:56:52 +03:00

lint: Fix unused bufferRange and toBufferView

This commit is contained in:
Mattias Wadman 2021-09-28 02:07:01 +02:00
parent 618c1ea79f
commit 13e98d44be
2 changed files with 0 additions and 19 deletions

View File

@ -12,11 +12,6 @@ import (
"github.com/wader/fq/pkg/ranges" "github.com/wader/fq/pkg/ranges"
) )
type bufferRange struct {
bb *bitio.Buffer
r ranges.Range
}
var _ Value = (*BufferView)(nil) var _ Value = (*BufferView)(nil)
var _ ToBuffer = (*BufferView)(nil) var _ ToBuffer = (*BufferView)(nil)

View File

@ -26,7 +26,6 @@ import (
"github.com/wader/fq/internal/pos" "github.com/wader/fq/internal/pos"
"github.com/wader/fq/pkg/bitio" "github.com/wader/fq/pkg/bitio"
"github.com/wader/fq/pkg/decode" "github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/ranges"
"github.com/wader/gojq" "github.com/wader/gojq"
) )
@ -348,19 +347,6 @@ func toBufferEx(v interface{}, inArray bool) (*bitio.Buffer, error) {
} }
} }
func toBufferView(v interface{}) (BufferView, error) {
switch vv := v.(type) {
case ToBufferView:
return vv.ToBufferView()
default:
bb, err := toBuffer(v)
if err != nil {
return BufferView{}, err
}
return BufferView{bb: bb, r: ranges.Range{Len: bb.Len()}, unit: 8}, nil
}
}
func toValue(opts Options, v interface{}) (interface{}, bool) { func toValue(opts Options, v interface{}) (interface{}, bool) {
switch v := v.(type) { switch v := v.(type) {
case JQValueEx: case JQValueEx: