MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / MarshalJSON

Method MarshalJSON

processing/gravity_type.go:16–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func (gt GravityType) MarshalJSON() ([]byte, error) {
17 for k, v := range GravityTypes {
18 if v == gt {
19 return fmt.Appendf([]byte{}, "%q", k), nil
20 }
21 }
22 return fmt.Appendf([]byte{}, "%s", "null"), nil
23}
24
25const (
26 GravityUnknown GravityType = iota

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected