# Copying Interface Values In Go

DevFeed: [Copying Interface Values In Go](<https://devfeed.tech/articles/copying-interface-values-in-go-22113.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2016/05/copying-interface-values-in-go.html>)

Published: 2016-05-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [go](<https://devfeed.tech/tags/go.md>), [go-language](<https://devfeed.tech/tags/go-language.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [interface](<https://devfeed.tech/tags/interface.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

This tutorial examines how Go copies interface values that contain concrete values rather than pointers. It uses a small program to inspect interface representation and reports that assigning a user value to an interface creates a separate copy at a different address from the original value.

## Source excerpt

I am constantly thinking about the Go language and how things work. Lately I have been thinking how everything in Go is by value. We see this when we pass values to functions, when we iterate over slices and when we perform type assertions. In every case, copies of the values that are stored in these data structures are returned. When I first started learning Go this threw me off, but I have come to appreciate the reasonability this brings to our code.