recursiveCopy

package module
v0.0.0-...-d0160a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2016 License: MIT Imports: 1 Imported by: 1

README

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)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(obj interface{}) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL