{"repo":"switchupcb/copygen","free":true,"listed":false,"github":"https://github.com/switchupcb/copygen","clone":"git clone https://github.com/switchupcb/copygen.git","description":"Copygen generates code based on Go types. Generate type-based code to copy values from type to type and fields from struct to struct by default (copier without reflection).","language":"Go","stars":406,"topics":["go","golang","copy","code-generation","code-generator","generator"],"license":"AGPL-3.0","category":"dev-tools","readme_excerpt":"--- Copygen saves you from losing time writing repetitive code with a type-based code generator. What is Copygen? Copygen is a command-line and programmatic code generator that generates custom type-based code, including type-to-type and field-to-field code without adding any reflection or dependencies to your project. Manual-copy code generated by Copygen is 391x faster than jinzhu/copier and adds no allocation to your program. Copygen supports every Go type including basic , array , slice , map , chan , interface , and func types. Table of Contents Topic Categories :------------------------------- :-------------------------------------------------------------------------------------------------------------------------------------------- Usage Types, Setup, Command Line, Output Customization Custom Objects, Templates Matcher Automatch, Manual, Depth Usecases When to Use, Custom Generation License What can I do?, License Exception How do you use Copygen? Each example has a README . Example Description :------------------------------- :--------------------------------------- main The default example. basic Matches a basic type to a field. automatch Uses the automatch matcher with depth. map Uses the manual map matcher. tag Uses the manual tag matcher. cast Uses the cast modifier. deepcopy (Roadmap) Uses the deepcopy option. error Uses .go templates to return an error. tmpl Uses .tmpl templates. program Uses Copygen programmatically. multi tests every type. This example uses th","default_branch":null,"files":null,"tree":[],"storefront":"/r/switchupcb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/switchupcb/copygen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}