Conditions | 1 |
Total Lines | 9 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package model |
||
19 | func (b *Booking) MarshalJSON() ([]byte, error) { |
||
20 | return json.Marshal(&struct { |
||
21 | Id int `json:"booking_id"` |
||
22 | DateStart string `json:"date_start"` |
||
23 | DateEnd string `json:"date_end"` |
||
24 | }{ |
||
25 | Id: b.Id, |
||
26 | DateStart: b.DateStart.Format(DateFormat), |
||
27 | DateEnd: b.DateEnd.Format(DateFormat), |
||
28 | }) |
||
56 |