forked from External/ergo
upgrade buntdb and dependencies
This commit is contained in:
parent
025f062a43
commit
008416e4dd
21 changed files with 985 additions and 1566 deletions
2
vendor/github.com/tidwall/pretty/README.md
generated
vendored
2
vendor/github.com/tidwall/pretty/README.md
generated
vendored
|
|
@ -1,7 +1,7 @@
|
|||
# Pretty
|
||||
[](https://travis-ci.org/tidwall/prettty)
|
||||
[](http://gocover.io/github.com/tidwall/pretty)
|
||||
[](https://godoc.org/github.com/tidwall/pretty)
|
||||
[](https://pkg.go.dev/github.com/tidwall/pretty)
|
||||
|
||||
|
||||
Pretty is a Go package that provides [fast](#performance) methods for formatting JSON for human readability, or to compact JSON for smaller payloads.
|
||||
|
|
|
|||
34
vendor/github.com/tidwall/pretty/pretty.go
generated
vendored
34
vendor/github.com/tidwall/pretty/pretty.go
generated
vendored
|
|
@ -318,21 +318,25 @@ func hexp(p byte) byte {
|
|||
}
|
||||
|
||||
// TerminalStyle is for terminals
|
||||
var TerminalStyle = &Style{
|
||||
Key: [2]string{"\x1B[94m", "\x1B[0m"},
|
||||
String: [2]string{"\x1B[92m", "\x1B[0m"},
|
||||
Number: [2]string{"\x1B[93m", "\x1B[0m"},
|
||||
True: [2]string{"\x1B[96m", "\x1B[0m"},
|
||||
False: [2]string{"\x1B[96m", "\x1B[0m"},
|
||||
Null: [2]string{"\x1B[91m", "\x1B[0m"},
|
||||
Append: func(dst []byte, c byte) []byte {
|
||||
if c < ' ' && (c != '\r' && c != '\n' && c != '\t' && c != '\v') {
|
||||
dst = append(dst, "\\u00"...)
|
||||
dst = append(dst, hexp((c>>4)&0xF))
|
||||
return append(dst, hexp((c)&0xF))
|
||||
}
|
||||
return append(dst, c)
|
||||
},
|
||||
var TerminalStyle *Style
|
||||
|
||||
func init() {
|
||||
TerminalStyle = &Style{
|
||||
Key: [2]string{"\x1B[94m", "\x1B[0m"},
|
||||
String: [2]string{"\x1B[92m", "\x1B[0m"},
|
||||
Number: [2]string{"\x1B[93m", "\x1B[0m"},
|
||||
True: [2]string{"\x1B[96m", "\x1B[0m"},
|
||||
False: [2]string{"\x1B[96m", "\x1B[0m"},
|
||||
Null: [2]string{"\x1B[91m", "\x1B[0m"},
|
||||
Append: func(dst []byte, c byte) []byte {
|
||||
if c < ' ' && (c != '\r' && c != '\n' && c != '\t' && c != '\v') {
|
||||
dst = append(dst, "\\u00"...)
|
||||
dst = append(dst, hexp((c>>4)&0xF))
|
||||
return append(dst, hexp((c)&0xF))
|
||||
}
|
||||
return append(dst, c)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Color will colorize the json. The style parma is used for customizing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue