Skip to content
Recursively copy structs in goLang
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
recursiveCopy.go

README.md

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)
You can’t perform that action at this time.