MCPcopy
hub / github.com/davyxu/tabtoy / Run

Method Run

v2/printer/pbt.go:22–41  ·  view source on GitHub ↗
(g *Globals)

Source from the content-addressed store, hash-verified

20}
21
22func (self *pbtPrinter) Run(g *Globals) *Stream {
23
24 bf := NewStream()
25 bf.Printf("# Generated by github.com/davyxu/tabtoy\n")
26 bf.Printf("# Version: %s\n", g.Version)
27
28 for _, tab := range g.Tables {
29
30 if !tab.LocalFD.MatchTag(".pbt") {
31 log.Infof("%s: %s", i18n.String(i18n.Printer_IgnoredByOutputTag), tab.Name())
32 continue
33 }
34
35 if !printTablePBT(bf, tab) {
36 return nil
37 }
38 }
39
40 return bf
41}
42
43func printTablePBT(bf *Stream, tab *model.Table) bool {
44

Callers

nothing calls this directly

Calls 6

PrintfMethod · 0.95
StringFunction · 0.92
NewStreamFunction · 0.85
printTablePBTFunction · 0.85
MatchTagMethod · 0.80
NameMethod · 0.65

Tested by

no test coverage detected