SetNotefiles sets the notefile list within the a notehubMessage data structure
(notefiles map[string]*Notefile)
| 540 | |
| 541 | // SetNotefiles sets the notefile list within the a notehubMessage data structure |
| 542 | func (msg *notehubMessage) SetNotefiles(notefiles map[string]*Notefile) error { |
| 543 | // Set native form |
| 544 | if msg.nf == nil { |
| 545 | msg.nf = &nf{} |
| 546 | } |
| 547 | msg.nf.Notefiles = ¬efiles |
| 548 | |
| 549 | // Set compressed form |
| 550 | JSON, err := note.JSONMarshal(notefiles) |
| 551 | if err != nil { |
| 552 | return err |
| 553 | } |
| 554 | if msg.cf == nil { |
| 555 | msg.cf = &cf{} |
| 556 | } |
| 557 | msg.cf.Notefiles, err = jsonCompress(JSON) |
| 558 | |
| 559 | return err |
| 560 | } |
| 561 | |
| 562 | // GetNotefiles gets the multi-notefile structure from within the a notehubMessage |
| 563 | func (msg *notehubMessage) GetNotefiles() (notefiles map[string]*Notefile, err error) { |
nothing calls this directly
no test coverage detected