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:
parent
618c1ea79f
commit
13e98d44be
@ -12,11 +12,6 @@ import (
|
||||
"github.com/wader/fq/pkg/ranges"
|
||||
)
|
||||
|
||||
type bufferRange struct {
|
||||
bb *bitio.Buffer
|
||||
r ranges.Range
|
||||
}
|
||||
|
||||
var _ Value = (*BufferView)(nil)
|
||||
var _ ToBuffer = (*BufferView)(nil)
|
||||
|
||||
|
@ -26,7 +26,6 @@ import (
|
||||
"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"
|
||||
)
|
||||
@ -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) {
|
||||
switch v := v.(type) {
|
||||
case JQValueEx:
|
||||
|
Loading…
Reference in New Issue
Block a user