// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 package zoopb import ( "go.wit.com/log" ) // this is the default table layout for repos in forge func (pb *Packages) PrintTable() string { tablePB := pb.MakeDefaultTable() tablePB.PrintTable() return log.Sprintf("pb.DefaultTable: %d packages", pb.Len()) } func (pb *Packages) MakeDefaultTable() *PackagesTable { t := pb.NewTable("apt packages") t.NewUuid() var col *PackageFunc col = t.AddStringFunc(" I", func(p *Package) string { if p.Installed { return " X" } return "" }) col.Width = 3 col = t.AddMD5SUM() col.Width = 6 col = t.AddSHA256() col.Width = 6 col = t.AddArchitecture() col.Width = 8 col = t.AddPackage() col.Width = 30 col = t.AddVersion() col.Width = 20 col = t.AddFilename() col.Width = -1 col.Header.Name = "apt package path" return t }