MakeViewModel returns a new DocumentVM with the data from this struct
()
| 194 | |
| 195 | // MakeViewModel returns a new DocumentVM with the data from this struct |
| 196 | func (doc *document) MakeViewModel() DocumentVM { |
| 197 | return DocumentVM{ |
| 198 | BlobRef: doc.permanode, |
| 199 | DisplayUrl: doc.displayURL(), |
| 200 | Title: doc.title, |
| 201 | SomeTitle: doc.someTitle(), |
| 202 | DateYyyyMmDd: doc.dateYyyyMmDd(), |
| 203 | DueYyyyMmDd: doc.dueYyyyMmDd(), |
| 204 | Tags: doc.tags, |
| 205 | PhysicalLocation: doc.physicalLocation, |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | // MakeDocumentViewModels takes a slice of Documents and returns a slice of |
| 210 | // the same number of DocumentVMs with the data converted. |
no test coverage detected