diff options
| author | Jeff Carr <[email protected]> | 2025-10-14 07:52:32 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-14 07:52:32 -0500 |
| commit | bf5891a4c983fd4300ed57d1e42a0e0dca72fea4 (patch) | |
| tree | 4bfbad9b5f08e9c33f01c903e2792c23b68a9714 /tablePB.go | |
| parent | 92e9b066f424c8e8055c01365bbd5e45e3c4f1b4 (diff) | |
no using log herev0.0.22
Diffstat (limited to 'tablePB.go')
| -rw-r--r-- | tablePB.go | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -7,19 +7,18 @@ import ( "os" "go.wit.com/lib/protobuf/guipb" - "go.wit.com/log" "google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/wrapperspb" ) func PrintTable(pb *guipb.Table) { - // log.Info("print PB here") + // fmt.Info("print PB here") if pb.Grid == nil { - // log.Info("grid = nil") + // fmt.Info("grid = nil") } else { - // log.Info("grid.Id =", pb.Grid.Id) + // fmt.Info("grid.Id =", pb.Grid.Id) } if cursize, ok := getTerminalWidth(); ok { TERMSIZE = cursize @@ -28,7 +27,7 @@ func PrintTable(pb *guipb.Table) { var args []string var sizes []int - // log.Info("INFO: table len=", len(pb.AnyCols)) + // fmt.Info("INFO: table len=", len(pb.AnyCols)) // first print the table header for _, col := range pb.AnyCols { args = append(args, col.Header.Name) @@ -39,9 +38,9 @@ func PrintTable(pb *guipb.Table) { } } // header, _ := StandardTableRowDebug(sizes, args) - // log.Info(header) + // fmt.Info(header) header, _ := StandardTableRow(sizes, args) - log.Info(header) + fmt.Println(header) // now print the table rows for i := range len(pb.AnyCols[0].Vals) { @@ -50,14 +49,14 @@ func PrintTable(pb *guipb.Table) { if val, ok := getAnyCell(col, i); ok { cells = append(cells, val) } else { - log.Info("cobol TABLE CELL FAILED", col.Header.Name, i, val, ok) + fmt.Println("cobol TABLE CELL FAILED", col.Header.Name, i, val, ok) } } line, fmtline := StandardTableRow(sizes, cells) if os.Getenv("TABLEPB_VERBOSE") == "true" { line += "FMT: " + fmtline } - log.Info(line) + fmt.Println(line) } } @@ -110,7 +109,7 @@ func getAnyCell(col *guipb.AnyCol, row int) (string, bool) { } return "", false default: - log.Info("cell unhandled type", col.Attr.Type) + fmt.Println("cell unhandled type", col.Attr.Type) } // cellTime := r.Vals[row] // s := FormatDuration(time.Since(cellTime.AsTime())) |
