[Canonical-tech] Handling active dependencies in Go

Free Ekanayaka free.ekanayaka at canonical.com
Tue Dec 18 14:12:49 UTC 2012


Thanks for explaining, makes perfect sense to me and it's indeed what
we're doing too (btw reading juju and stdlib code helped).

On Tue, Dec 18, 2012 at 2:08 PM, Gustavo Niemeyer <gustavo at niemeyer.net> wrote:
> lready clear: most places return pointers, both in juju and in the Go stdlib
> itself. Some types, though, benefit from being used as values due to their
> nature. That's the case of time.Time, for example.
>
> Both are fine approaches, and as long as you're thinking about what's the
> behavior you expect over usage of the type in terms of copying, mutability,
> memory usage, lifetime of the value, etc, you can pick either and run with
> it.



More information about the Juju-dev mailing list