Skip to content

Commit 6ff15c9

Browse files
committed
printer: simplify init config
1 parent 9cca38a commit 6ff15c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

printer/printer.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ type printer struct {
3535
}
3636

3737
func (p *printer) init(cfg *Config) {
38-
if cfg == nil {
39-
cfg = &Config{}
38+
if cfg != nil {
39+
p.Config = *cfg
4040
}
41-
p.Config = *cfg
4241
}
4342

4443
func (p *printer) writeString(s string) {

0 commit comments

Comments
 (0)