summaryrefslogtreecommitdiff
path: root/vendor/github.com/goccy/go-json/internal/encoder/option.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-10 14:42:14 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-10 14:42:14 +0200
commitf2e5bedea6fb93fbbf68ed8f7153c353cc57a9f0 (patch)
tree475ae9e7470d0df670ab2a59dce351cd1d07498a /vendor/github.com/goccy/go-json/internal/encoder/option.go
parentfixes + db changes (#204) (diff)
downloadgotosocial-f2e5bedea6fb93fbbf68ed8f7153c353cc57a9f0.tar.xz
migrate go version to 1.17 (#203)
* migrate go version to 1.17 * update contributing
Diffstat (limited to 'vendor/github.com/goccy/go-json/internal/encoder/option.go')
-rw-r--r--vendor/github.com/goccy/go-json/internal/encoder/option.go41
1 files changed, 41 insertions, 0 deletions
diff --git a/vendor/github.com/goccy/go-json/internal/encoder/option.go b/vendor/github.com/goccy/go-json/internal/encoder/option.go
new file mode 100644
index 000000000..f5f1f044e
--- /dev/null
+++ b/vendor/github.com/goccy/go-json/internal/encoder/option.go
@@ -0,0 +1,41 @@
+package encoder
+
+import "context"
+
+type OptionFlag uint8
+
+const (
+ HTMLEscapeOption OptionFlag = 1 << iota
+ IndentOption
+ UnorderedMapOption
+ DebugOption
+ ColorizeOption
+ ContextOption
+)
+
+type Option struct {
+ Flag OptionFlag
+ ColorScheme *ColorScheme
+ Context context.Context
+}
+
+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
+)