gocharm or harm.v5 how to get charm dir?

Nate Finch nate.finch at canonical.com
Mon Jun 1 18:54:01 UTC 2015

Hooks and actions all fire with the root of the charmdir as the current
directory, so in general, you don't need to get it, you're already there.

For example, if your charm has <charmdir>/assets/foo.jpg   ... you can just

f, err := os.Open("assets/foo.jpg")

and it'll work correctly.

On Mon, Jun 1, 2015 at 2:35 PM, Vasiliy Tolstov <v.tolstov at selfip.ru> wrote:

> Does it possible to determine charm dir using go bindings?
> I need absolute path to charm dir to get files from assets dir in
> various places in my code.
> --
> Vasiliy Tolstov,
> e-mail: v.tolstov at selfip.ru
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20150601/70d3ba3a/attachment.html>

More information about the Juju mailing list