summaryrefslogtreecommitdiff
path: root/table.go
blob: 427dfffa5017a838e8cbea341c07becb30adefe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0

package ENV

import (
	"fmt"

	"go.wit.com/lib/cobol"
)

func PrintTable() string {
	var data [][]string
	data = append(data, []string{"New Source", "ENV[name]", "Value"})
	for k := range envPB.IterAll() {
		data = append(data, []string{k.Global, k.Var, k.Value})
	}
	cobol.SimpleTableSizes(data, []int{20, 20, -1})
	return fmt.Sprintf("ENV: total=(%d)", envPB.Len())
}