Skip to content

Commit

Permalink
refact - terminal table implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Strappazzon C committed Nov 17, 2023
1 parent 82ac1d4 commit e90653c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions aws/database/describe/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func NewCommand() *cobra.Command {
}

tbl := table.New("ATTRIBUTE", "VALUE")
tbl.SetFirstColumnAlignment(table.Right)
tbl.Column(0, table.Column{Alignment: table.Right})

Check failure on line 40 in aws/database/describe/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

tbl.Column undefined (type table.Table has no field or method Column)

Check failure on line 40 in aws/database/describe/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

undefined: table.Column
for k, v := range instance.JSON() {
tbl.AddRow(k, v)
tbl.Add(k, v)

Check failure on line 42 in aws/database/describe/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

tbl.Add undefined (type table.Table has no field or method Add)
}
tbl.Print()
},
Expand Down
2 changes: 1 addition & 1 deletion aws/database/logs/list/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewCommand() *cobra.Command {

tbl := table.New("FILE", "SIZE")
for _, log := range logs {
tbl.AddRow(log.FileName, log.Size)
tbl.Add(log.FileName, log.Size)

Check failure on line 54 in aws/database/logs/list/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

tbl.Add undefined (type table.Table has no field or method Add)
}
tbl.Print()
},
Expand Down
2 changes: 1 addition & 1 deletion aws/database/parameters/describe/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewCommand() *cobra.Command {

tbl := table.New("NAME", "VALUES", "APPLY METHOD", "APPLY TYPE", "MODIFIABLE")
for _, parameter := range parameters {
tbl.AddRow(parameter.Name, parameter.Value, parameter.ApplyMethod, parameter.ApplyType, parameter.IsModifiable)
tbl.Add(parameter.Name, parameter.Value, parameter.ApplyMethod, parameter.ApplyType, parameter.IsModifiable)

Check failure on line 41 in aws/database/parameters/describe/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

tbl.Add undefined (type table.Table has no field or method Add)
}
tbl.Print()
},
Expand Down
2 changes: 1 addition & 1 deletion aws/database/parameters/list/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewCommand() *cobra.Command {

tbl := table.New("NAME", "DESCRIPTION", "FAMILY")
for _, parameter := range parameters {
tbl.AddRow(parameter.Name, parameter.Description, parameter.Family)
tbl.Add(parameter.Name, parameter.Description, parameter.Family)

Check failure on line 41 in aws/database/parameters/list/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

tbl.Add undefined (type table.Table has no field or method Add)
}
tbl.Print()

Expand Down
2 changes: 1 addition & 1 deletion aws/databases/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewCommand() *cobra.Command {

tbl := table.New("ENGINE", "VERSION", "IDENTIFIER", "CLASS", "STATUS")
for _, instance := range instances {
tbl.AddRow(instance.Engine, instance.Version, instance.Identifier, instance.Class, instance.Status)
tbl.Add(instance.Engine, instance.Version, instance.Identifier, instance.Class, instance.Status)

Check failure on line 27 in aws/databases/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

tbl.Add undefined (type table.Table has no field or method Add)
}
tbl.Print()
},
Expand Down
2 changes: 1 addition & 1 deletion mysql/digest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewCommand() *cobra.Command {
max := queries.ScoreMax()

for index := range *queries {
tbl.AddRow(
tbl.Add(

Check failure on line 69 in mysql/digest/main.go

View workflow job for this annotation

GitHub Actions / Check code quality and run tests

tbl.Add undefined (type table.Table has no field or method Add)
(*queries)[index].ID,
formatScore(min, max, (*queries)[index].Score),
(*queries)[index].Count,
Expand Down

0 comments on commit e90653c

Please sign in to comment.