MCPcopy
hub / github.com/mum4k/termdash / New

Function New

private/segdisp/sixteen/sixteen.go:303–312  ·  view source on GitHub ↗

New creates a new segment display. Initially all the segments are off.

(opts ...Option)

Source from the content-addressed store, hash-verified

301// New creates a new segment display.
302// Initially all the segments are off.
303func New(opts ...Option) *Display {
304 d := &Display{
305 segments: map[Segment]bool{},
306 }
307
308 for _, opt := range opts {
309 opt.set(d)
310 }
311 return d
312}
313
314// Clear clears the entire display, turning all segments off.
315func (d *Display) Clear(opts ...Option) {

Callers 5

drawCharMethod · 0.92
mustDrawCharFunction · 0.92
TestDrawFunction · 0.70
mustDrawSegmentsFunction · 0.70
TestSetCharacterFunction · 0.70

Calls 1

setMethod · 0.65

Tested by 4

mustDrawCharFunction · 0.74
TestDrawFunction · 0.56
mustDrawSegmentsFunction · 0.56
TestSetCharacterFunction · 0.56