Clear clears the entire display, turning all segments off.
(opts ...Option)
| 313 | |
| 314 | // Clear clears the entire display, turning all segments off. |
| 315 | func (d *Display) Clear(opts ...Option) { |
| 316 | for _, opt := range opts { |
| 317 | opt.set(d) |
| 318 | } |
| 319 | |
| 320 | d.segments = map[Segment]bool{} |
| 321 | } |
| 322 | |
| 323 | // SetSegment sets the specified segment on. |
| 324 | // This method is idempotent. |