code: func (t *FpdfTpl) GobEncode() ([]byte, error) {
  	w := new(bytes.Buffer)
  	encoder := gob.NewEncoder(w)
  
  	childrensTemplates := t.childrensTemplates()
  	firstClassTemplates := make([]Template, 0)
  
  found_continue:
  	for x := 0; x < len(t.templates); x++ {
  		for y := 0; y < len(childrensTemplates); y++ {
  			if childrensTemplates[y].ID() == t.templates[x].ID() {
  				continue found_continue
  			}
  		}
  
  		firstClassTemplates = append(firstClassTemplates, t.templates[x])
  	}
  	err := encoder.Encode(firstClassTemplates)
  
  	childrenImgs := t.childrenImages()
  	firstClassImgs := make(map[string]*ImageInfoType)
  
  	for key, img := range t.images {
  		if _, ok := childrenImgs[key]; !ok {
  			firstClassImgs[key] = img
  		}
  	}
  
  	if err == nil {
  		err = encoder.Encode(firstClassImgs)
  	}
  	if err == nil {
  		err = encoder.Encode(t.corner)
  	}
  	if err == nil {
  		err = encoder.Encode(t.size)
  	}
  	if err == nil {
  		err = encoder.Encode(t.bytes)
  	}
  	if err == nil {
  		err = encoder.Encode(t.page)
  	}
  
  	return w.Bytes(), err
  }
docs: // GobEncode encodes the receiving template into a byte buffer. Use GobDecode
  // to decode the byte buffer back to a template.