MCPcopy Index your code
hub / github.com/goccy/go-json / structKey

Method structKey

internal/encoder/code.go:714–720  ·  view source on GitHub ↗
(ctx *compileContext)

Source from the content-addressed store, hash-verified

712}
713
714func (c *StructFieldCode) structKey(ctx *compileContext) string {
715 if ctx.escapeKey {
716 rctx := &RuntimeContext{Option: &Option{Flag: HTMLEscapeOption}}
717 return fmt.Sprintf(`%s:`, string(AppendString(rctx, []byte{}, c.key)))
718 }
719 return fmt.Sprintf(`"%s":`, c.key)
720}
721
722func (c *StructFieldCode) flags() OpFlags {
723 var flags OpFlags

Callers 2

ToOpcodeMethod · 0.95
ToAnonymousOpcodeMethod · 0.95

Calls 1

AppendStringFunction · 0.85

Tested by

no test coverage detected