<div dir="ltr">I vote against using a local import. I believe this is contrary to the Go orthodoxy and will hinder adoption by potential external contributors.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jun 28, 2013 at 10:44 AM, Tim Penhey <span dir="ltr"><<a href="mailto:tim.penhey@canonical.com" target="_blank">tim.penhey@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
We currently have two commonly used idioms for importing checkers. In<br>
particular "<a href="http://launchpad.net/juju-core/testing/checkers" target="_blank">launchpad.net/juju-core/testing/checkers</a>".<br>
<br>
I have the preference of importing the checkers into the local namespace<br>
so they behave in the same way as the gocheck checkers. I find this<br>
makes the tests more readable. Given that the checkers package should<br>
only be bringing in checkers and not miscellaneous functions, then I'm<br>
happy to bring them into the local namespace.<br>
<br>
This means we have:<br>
<br>
c.Assert(foo, IsTrue)<br>
c.Assert(bar.SomeFunc(), IsDirectory)<br>
<br>
<br>
I know that Roger generally disapproves and has been including the<br>
checkers package normally. This would make the above:<br>
<br>
c.Assert(foo, checkers.IsTrue)<br>
c.Assert(bar.SomeFunc(), checkers.IsDirectory)<br>
<br>
<br>
What I don't want is arbitrary changing of the imports as different<br>
people touch various parts of the codebase into their preferred format.<br>
<br>
I'd like to get a team agreement on what approach people are happy with.<br>
<br>
I'm happy to go with a majority decision either way, but I'd like the<br>
team to decide. If we don't get a quorum of response (for whatever<br>
value that may be), I'm going to defer to William as tech lead.<br>
<br>
Cheers,<br>
Tim<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</font></span></blockquote></div><br></div>