(e *Email)
| 122 | } |
| 123 | |
| 124 | func setDefaultEmailValues(e *Email) error { |
| 125 | // Default values of an email |
| 126 | defaultEmail := Email{ |
| 127 | Body: Body{ |
| 128 | Intros: []string{}, |
| 129 | Dictionary: []Entry{}, |
| 130 | Outros: []string{}, |
| 131 | Signature: "Yours truly", |
| 132 | Greeting: "Hi", |
| 133 | }, |
| 134 | } |
| 135 | // Merge the given email with default one |
| 136 | // Default one overrides all zero values |
| 137 | return mergo.Merge(e, defaultEmail) |
| 138 | } |
| 139 | |
| 140 | // default values of the engine |
| 141 | func setDefaultHermesValues(h *Hermes) error { |
no outgoing calls