GetWriter returns the Writer if set, otherwise defaultWriter.
()
| 339 | |
| 340 | // GetWriter returns the Writer if set, otherwise defaultWriter. |
| 341 | func (p PrefixPrinter) GetWriter() io.Writer { |
| 342 | if p.Writer != nil { |
| 343 | return p.Writer |
| 344 | } |
| 345 | return defaultWriter |
| 346 | } |
| 347 | |
| 348 | // Prefix contains the data used as the beginning of a printed text via a PrefixPrinter. |
| 349 | type Prefix struct { |
no outgoing calls