mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 16:14:17 +02:00
replace & with new()
This commit is contained in:
@@ -43,7 +43,7 @@ type Table struct {
|
||||
}
|
||||
|
||||
func NewTable(conf *cfg.Config, columns, rows int) *Table {
|
||||
table := Table{Mode: conf.Output, maxwidth: cfg.GetTermWidth()}
|
||||
table := new(Table{Mode: conf.Output, maxwidth: cfg.GetTermWidth()})
|
||||
|
||||
table.Headers = make([]string, columns)
|
||||
table.RawHeaders = make([]string, columns)
|
||||
@@ -51,14 +51,14 @@ func NewTable(conf *cfg.Config, columns, rows int) *Table {
|
||||
table.lenHeaders = make([]int, columns)
|
||||
table.alignInts = conf.AlignInts
|
||||
|
||||
return &table
|
||||
return table
|
||||
}
|
||||
|
||||
func NewTableEmpty(conf *cfg.Config) *Table {
|
||||
table := Table{Mode: conf.Output, maxwidth: cfg.GetTermWidth()}
|
||||
table := new(Table{Mode: conf.Output, maxwidth: cfg.GetTermWidth()})
|
||||
table.alignInts = conf.AlignInts
|
||||
|
||||
return &table
|
||||
return table
|
||||
}
|
||||
|
||||
func (table *Table) WithHeaders(headers ...string) *Table {
|
||||
|
||||
Reference in New Issue
Block a user