MCPcopy
hub / github.com/inancgumus/learngo / print

Method print

interfaces/08-promoted-methods/list.go:20–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18type list []item
19
20func (l list) print() {
21 if len(l) == 0 {
22 fmt.Println("Sorry. We're waiting for delivery 🚚.")
23 return
24 }
25
26 for _, it := range l {
27 it.print()
28 }
29}
30
31func (l list) discount(ratio float64) {
32 for _, it := range l {

Callers 1

mainFunction · 0.95

Calls 2

PrintlnMethod · 0.80
printMethod · 0.65

Tested by

no test coverage detected