gocharm or harm.v5 how to get charm dir?
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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Juju