| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | package serializer |
||
| 2 | |||
| 3 | type Serializer interface { |
||
| 4 | Serialize(data interface{}, format string) ([]byte, error) |
||
| 5 | } |
||
| 6 | |||
| 7 | func New() Serializer { |
||
| 8 | 1 | return &coordinatingSerializer{ |
|
| 9 | formatSerializers: map[string]Serializer{ |
||
| 10 | "raw": &rawSerializer{}, |
||
| 11 | "json": &jsonSerializer{}, |
||
| 12 | "xml": &xmlSerializer{rootTag: "root"}, |
||
| 13 | }, |
||
| 16 |