mirror of
https://github.com/wader/fq.git
synced 2024-11-26 10:33:53 +03:00
Merge pull request #45 from wader/doc-improve2
doc: Some more dev infomration
This commit is contained in:
commit
d440c4fa11
19
doc/dev.md
19
doc/dev.md
@ -1,6 +1,7 @@
|
||||
# Implementation details
|
||||
|
||||
- fq uses a gojq fork that can be found at https://github.com/wader/gojq/tree/fq (the "fq" branch)
|
||||
- fq uses a readline fork that can be found at https://github.com/wader/readline/tree/fq (the "fq" branch)
|
||||
- cli readline uses raw mode so blocks ctrl-c to become a SIGINT
|
||||
|
||||
## Decoder implementation help
|
||||
@ -21,15 +22,25 @@ Flags can be struct with bit-fields.
|
||||
- Split into multiple sub formats if possible. Makes it possible to use them separately.
|
||||
- Validate/Assert
|
||||
- Error/Fatal/panic
|
||||
- Is format probeable or not?
|
||||
- Is format probeable or not
|
||||
- Can new formats be added to other formats
|
||||
- Does the new format include existing formats
|
||||
|
||||
Run `make doc` generate some of the documentation (requires ffmpeg and graphviz).
|
||||
|
||||
Run `make lint` to lint source code.
|
||||
|
||||
TODO: `make fuzz`
|
||||
|
||||
## Tests
|
||||
|
||||
Write new actual output:
|
||||
```sh
|
||||
make actual # write all actual outputs
|
||||
WRITE_ACTUAL=1 go run -run ... # write only specific tests
|
||||
# run all tests for one format
|
||||
go test -run TestFQTests/mp4 ./format/
|
||||
# write all actual outputs
|
||||
make actual
|
||||
# write for specific tests
|
||||
WRITE_ACTUAL=1 go run -run ...
|
||||
```
|
||||
|
||||
## Debug
|
||||
|
@ -250,10 +250,10 @@ fq can be used as a scrip interpreter:
|
||||
- [gojq's differences to jq](https://github.com/itchyny/gojq#difference-to-jq),
|
||||
notable is support for arbitrary-precision integers.
|
||||
- Supports hexdecimal `0xab`, octal `0o77` and binary `0b101` integer literals.
|
||||
- Has bitwise operations, `band`, `bor`, `bxor`, `bsl`, `bsr`, `bnot`.
|
||||
- Has bitwise operators, `band`, `bor`, `bxor`, `bsl`, `bsr`, `bnot`.
|
||||
- Try include `include "file?";` that don't fail if file is missing.
|
||||
- Some values can act as a object with keys even when it's an array, number etc.
|
||||
- There can be keys hidden from `keys` and `[]`. Used for, `_format`, `_bytes` etc.
|
||||
- There can be keys hidden from `keys` and `[]`.
|
||||
- Some values are readonly and can't be updated.
|
||||
|
||||
## Functions
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code below generated from scalar_gen.go.tmpl
|
||||
// Code below generated from decode_gen.go.tmpl
|
||||
package decode
|
||||
|
||||
import (
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code below generated from scalar_gen.go.tmpl
|
||||
// Code below generated from decode_gen.go.tmpl
|
||||
package decode
|
||||
|
||||
import (
|
||||
|
Loading…
Reference in New Issue
Block a user