Skip to content

xespona/copyRecursive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Recursive Copy in GoLang

This is a library to recursively copy structs in goLang

It is a slight modification taken from: https://gist.github.com/hvoecking/10772475

Usage

import "github.com/adam-hanna/recusiveCopy"

type MyFirstType {
	foobar string
}

type MySecondType struct {
	foo string
	bar int
	myStruct MyFirstType
}

first := MyFirstType { "hello" }
second := MySecondType { "good bye", 30, first }

myCopy := recusiveCopy.Copy(second)
log.Println(myCopy)

About

Recursively copy structs in goLang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%