mirror of
https://github.com/asciimoo/wuzz
synced 2024-11-05 00:00:24 +00:00
24 lines
343 B
Go
24 lines
343 B
Go
|
package formatter
|
||
|
|
||
|
import (
|
||
|
"encoding/hex"
|
||
|
"fmt"
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
type binaryFormatter struct {
|
||
|
}
|
||
|
|
||
|
func (f *binaryFormatter) Format(writer io.Writer, data []byte) error {
|
||
|
fmt.Fprint(writer, hex.Dump(data))
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (f *binaryFormatter) Title() string {
|
||
|
return "[binary]"
|
||
|
}
|
||
|
|
||
|
func (f *binaryFormatter) Searchable() bool {
|
||
|
return false
|
||
|
}
|