137 names refactor part ix

* state.annotator now takes a tag
* parseTag now takes a Tag, rejects nil tags.
$$50cent$$


On Wed, Jul 16, 2014 at 7:51 PM, Matt Williams <notifications@github.com>
wrote:

> In state/state_test.go:
>
> > -		"-foo",
> > -		"foo-",
> > -		"---",
> > -		"foo-bar",
> > -		"unit-foo",
> > -		"network",
> > -		"network-",
> > -		"action-wordpress",
> > -	}
> > -	for _, name := range bad {
> > -		c.Logf(name)
> > -		coll, id, err := state.ParseTag(s.State, name)
> > -		c.Assert(err, gc.ErrorMatches, `".*" is not a valid( [a-z]+)? tag`)
> > -		c.Check(coll, gc.Equals, "")
> > -		c.Check(id, gc.Equals, "")
> > -	}
>
> I see it now - thanks
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/juju/pull/316/files#r14988382>.
>