mirror of
https://github.com/wader/fq.git
synced 2024-09-11 20:07:11 +03:00
removed dead code
This commit is contained in:
parent
4f8a3120a8
commit
64c5646e21
@ -1,31 +1,14 @@
|
|||||||
// Copyright (c) 2022-2023 GoSecure Inc.
|
// Copyright (c) 2022-2023 GoSecure Inc.
|
||||||
|
// Copyright (c) 2024 Flare Systems
|
||||||
// Licensed under the MIT License
|
// Licensed under the MIT License
|
||||||
package pdu
|
package pdu
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/wader/fq/pkg/decode"
|
|
||||||
"github.com/wader/fq/pkg/scalar"
|
"github.com/wader/fq/pkg/scalar"
|
||||||
"golang.org/x/text/encoding/unicode"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func toTextUTF16Fn(length int) func(d *decode.D) string {
|
|
||||||
return func(d *decode.D) string {
|
|
||||||
enc := unicode.UTF16(unicode.LittleEndian, unicode.UseBOM)
|
|
||||||
decoder := enc.NewDecoder()
|
|
||||||
|
|
||||||
decoded, _ := decoder.String(string(d.BytesLen(length)))
|
|
||||||
return strings.TrimRight(decoded, "\x00")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func printPos(d *decode.D) {
|
|
||||||
fmt.Fprintf(os.Stderr, "Pos: %d\n", d.Pos())
|
|
||||||
}
|
|
||||||
|
|
||||||
var charMapper = scalar.UintFn(func(s scalar.Uint) (scalar.Uint, error) {
|
var charMapper = scalar.UintFn(func(s scalar.Uint) (scalar.Uint, error) {
|
||||||
char := s.Actual
|
char := s.Actual
|
||||||
s.Sym = fmt.Sprintf("%c", int(char))
|
s.Sym = fmt.Sprintf("%c", int(char))
|
||||||
|
Loading…
Reference in New Issue
Block a user