Adding upstream version 0.10.5.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
104c0c203d
commit
e733edafba
141 changed files with 102352 additions and 0 deletions
48
internal/encoder/option.go
Normal file
48
internal/encoder/option.go
Normal file
|
@ -0,0 +1,48 @@
|
|||
package encoder
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
)
|
||||
|
||||
type OptionFlag uint8
|
||||
|
||||
const (
|
||||
HTMLEscapeOption OptionFlag = 1 << iota
|
||||
IndentOption
|
||||
UnorderedMapOption
|
||||
DebugOption
|
||||
ColorizeOption
|
||||
ContextOption
|
||||
NormalizeUTF8Option
|
||||
FieldQueryOption
|
||||
)
|
||||
|
||||
type Option struct {
|
||||
Flag OptionFlag
|
||||
ColorScheme *ColorScheme
|
||||
Context context.Context
|
||||
DebugOut io.Writer
|
||||
DebugDOTOut io.WriteCloser
|
||||
}
|
||||
|
||||
type EncodeFormat struct {
|
||||
Header string
|
||||
Footer string
|
||||
}
|
||||
|
||||
type EncodeFormatScheme struct {
|
||||
Int EncodeFormat
|
||||
Uint EncodeFormat
|
||||
Float EncodeFormat
|
||||
Bool EncodeFormat
|
||||
String EncodeFormat
|
||||
Binary EncodeFormat
|
||||
ObjectKey EncodeFormat
|
||||
Null EncodeFormat
|
||||
}
|
||||
|
||||
type (
|
||||
ColorScheme = EncodeFormatScheme
|
||||
ColorFormat = EncodeFormat
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue