Esempio n. 1
0
func passignore(m gen.Method, text []string, p *gen.Printer) error {
	for _, a := range text {
		p.ApplyDirective(m, gen.IgnoreTypename(a))
		infof("%s generation pass: ignoring %s\n", m, a)
	}
	return nil
}
Esempio n. 2
0
func passignore(m gen.Method, text []string, p *gen.Printer) error {
	pushstate(m.String())
	for _, a := range text {
		p.ApplyDirective(m, gen.IgnoreTypename(a))
		infof("ignoring %s\n", a)
	}
	popstate()
	return nil
}
Esempio n. 3
0
func (f *FileSet) PrintTo(p *gen.Printer) error {
	f.applyDirs(p)
	for _, el := range f.Identities {
		el.SetVarname("z")
		err := p.Print(el)
		if err != nil {
			return err
		}
	}
	return nil
}
Esempio n. 4
0
File: getast.go Progetto: kgrz/msgp
func (f *FileSet) PrintTo(p *gen.Printer) error {
	f.applyDirs(p)
	names := make([]string, 0, len(f.Identities))
	for name := range f.Identities {
		names = append(names, name)
	}
	sort.Strings(names)
	for _, name := range names {
		el := f.Identities[name]
		el.SetVarname("z")
		err := p.Print(el)
		if err != nil {
			return err
		}
	}
	return nil
}