code: func (g *Generator) Run(out io.Writer) error {
  	g.out = &bytes.Buffer{}
  
  	for len(g.typesUnseen) > 0 {
  		t := g.typesUnseen[len(g.typesUnseen)-1]
  		g.typesUnseen = g.typesUnseen[:len(g.typesUnseen)-1]
  		g.typesSeen[t] = true
  
  		if err := g.genDecoder(t); err != nil {
  			return err
  		}
  		if err := g.genEncoder(t); err != nil {
  			return err
  		}
  
  		if !g.marshalers[t] {
  			continue
  		}
  
  		if err := g.genStructMarshaler(t); err != nil {
  			return err
  		}
  		if err := g.genStructUnmarshaler(t); err != nil {
  			return err
  		}
  	}
  	g.printHeader()
  	_, err := out.Write(g.out.Bytes())
  	return err
  }
docs: // Run runs the generator and outputs generated code to out.