Mattias Wadman
dec433fc53
help,markdown: Fix double line breaks when converting to text
...
Also fix ugly last line break hack
2023-03-02 23:38:11 +01:00
Mattias Wadman
8e0dde03d0
decode: Support multiple format args and some rename and refactor
...
This will allow passing both cli options and format options to sub decoder.
Ex: pass keylog option to a tls decoder when decoding a pcap.
Ex: pass decode options to a format inside a http body inside a pcap.
Add ArgAs method to lookup argument based on type. This also makes the format
decode function have same signature as sub decoders in the decode API.
This change decode.Format a bit:
DecodeFn is now just func(d *D) any
DecodeInArg renamed to DefaultInArg
2023-02-18 21:38:51 +01:00
Mattias Wadman
9b81d4d3ab
decode: More type safe API and split scalar into multiple types
...
Preparation to make decoder use less memory and API more type safe.
Now each scalar type has it's own struct type so it can store different
things and enables to have a scalar interface.
Also own types will enable experimenting with decode DLS designs like
using chained methods that are type aware.
2022-12-14 16:23:58 +01:00
Mattias Wadman
a7a101ca67
doc,help: Nicer format help and move help tests into each format
...
Also add authors to avro and macho decoders
Generated with:
for i in $(go run . -r -n '_registry | [([([.files[][].name | split(".")[0]] | unique[]), (.formats[].name)] | count[] | select(.[1] == 2)[0]), (.formats[] | select(.decode_in_arg).name)] | unique[]'); do DIR=$(dirname $(find format -name $i.go)); echo "$ fq -h $i" > "$DIR/testdata/help_$i.fqtest" ; done
2022-09-22 23:07:58 +02:00
Mattias Wadman
1385b5d0ba
wasm: Add some documentation
2022-09-12 11:53:48 +02:00
@0xb17bea125
ae4529c491
wasm: run golangci-lint run --fix
2022-08-23 21:12:29 +09:00
@0xb17bea125
bcc0dfd9f0
wasm: fix comment format
2022-08-23 21:09:56 +09:00
@0xb17bea125
2eb1750574
wasm: update tests
2022-08-23 21:07:44 +09:00
@0xb17bea125
cd037c514d
wasm: add comment to clarify lazy initialization
2022-08-23 17:46:00 +09:00
@0xb17bea125
db8021c931
wasm: define and use constants for some insturctions
2022-08-23 08:42:34 +09:00
@0xb17bea125
e5cf1731e3
wasm: make the godoc formatter happy
2022-08-22 21:30:49 +09:00
@0xb17bea125
d5d9e738b6
wasm: use FieldULEB128() / FieldSLEB128() defined in the upstream
2022-08-22 21:09:26 +09:00
@0xb17bea125
289ddf59fb
wasm: fix lint issues
2022-08-22 21:00:54 +09:00
@0xb17bea125
00869b3701
wasm: avoid race condition
2022-08-22 21:00:02 +09:00
@0xb17bea125
7401d141e8
wasm: use WRITE_ACTUAL=1 to generate .fqtest files
2022-08-20 16:11:33 +09:00
@0xb17bea125
e1691dec4f
wasm: remove unused function
2022-08-20 16:04:18 +09:00
@0xb17bea125
fead68de50
wasm: tidy up
2022-08-20 15:50:14 +09:00
@0xb17bea125
cbb5a8ed00
wasm: further simplification
2022-08-20 15:25:11 +09:00
@0xb17bea125
ae08bf70d4
wasm: use s.ActualU() instead of s.Actual.(uint64)
2022-08-20 15:02:52 +09:00
@0xb17bea125
3298d181fe
wasm: to be able to probe
2022-08-20 14:55:16 +09:00
@0xb17bea125
b0f3fec855
wasm: remove nolint:unparam which is no longer needed
2022-08-19 18:49:19 +09:00
@0xb17bea125
2037b86abd
wasm: use map, not switch
2022-08-19 18:47:50 +09:00
@0xb17bea125
0ad5a8ec2f
wasm: use underscores for symbol values
2022-08-19 14:50:56 +09:00
@0xb17bea125
63f4a7267c
wasm: use scalar.UToSymStr for simplicity
2022-08-19 14:35:16 +09:00
@0xb17bea125
3fca7cc09a
wasm: fix lint issues
2022-08-19 09:05:46 +09:00
Takashi Oguma
934ed9a809
wasm: initial version
2022-08-18 21:40:30 +09:00