// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 package forgepb import ( "go.wit.com/lib/protobuf/gitpb" ) func (f *Forge) PrintForgedTable(pb *gitpb.Repos) { tablePB := f.makeForgedTable(pb) tablePB.PrintTable() } func (f *Forge) makeForgedTable(pb *gitpb.Repos) *gitpb.ReposTable { t := pb.NewTable("forgedList") t.NewUuid() var col *gitpb.RepoAnyFunc col = t.AddMasterVersion() col.Width = 7 col = t.AddMasterBranchName() col.Width = 10 col = t.AddStringFunc("blah", func(r *gitpb.Repo) string { if r.Tags == nil { return "tags=nil" } if r.Tags.Master == nil { return "mtag=nil" } return r.Tags.Master.Hash }) col.Width = 12 col = t.AddNamespace() col.Width = 32 col = t.AddURL() col.Width = 32 col = t.AddFullPath() col.Width = -1 return t }