{"repo":"jinzhu/copier","free":true,"listed":false,"github":"https://github.com/jinzhu/copier","clone":"git clone https://github.com/jinzhu/copier.git","description":"Copier for golang, copy value from struct to struct and more","language":"Go","stars":6174,"topics":["go","golang","golang-package","copy"],"license":"MIT","category":"dev-tools","readme_excerpt":"Copier I am a copier, I copy everything from one to another Key Features - Field-to-field and method-to-field copying based on matching names - Support for copying data: - From slice to slice - From struct to slice - From map to map - Field manipulation through tags: - Enforce field copying with copier:\"must\" - Override fields even when IgnoreEmpty is set with copier:\"override\" - Exclude fields from being copied with copier:\"-\" Getting Started Installation To start using Copier, install Go and run go get: Basic Import Copier into your application to access its copying capabilities Basic Copying Tag Usage Examples copier:\"-\" - Ignoring Fields Fields tagged with copier:\"-\" are explicitly ignored by Copier during the copying process. copier:\"must\" - Enforcing Field Copy The copier:\"must\" tag forces a field to be copied, resulting in a panic or an error if the field cannot be copied. copier:\"must,nopanic\" - Enforcing Field Copy Without Panic Similar to copier:\"must\" , but Copier returns an error instead of panicking if the field is not copied. copier:\"override\" - Overriding Fields with IgnoreEmpty Fields tagged with copier:\"override\" are copied even if IgnoreEmpty is set to true in Copier options and works for nil values. Specifying Custom Field Names Use field tags to specify a custom field name when the source and destination field names do not match. Other examples Copy from Method to Field with Same Name Illustrates copying from a method to a field and vice versa. Copy Struct","default_branch":null,"files":null,"tree":[],"storefront":"/r/jinzhu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jinzhu/copier/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."}