add addrs.Module.Equal

Mirror the addrs.ModuleInstance.Equal method
This commit is contained in:
James Bardin 2020-03-06 11:30:04 -05:00
parent bd9cfca794
commit 6ae9013c3f
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ func (m Module) String() string {
return strings.Join(steps, ".")
}
func (m Module) Equal(other Module) bool {
return m.String() == other.String()
}
// Child returns the address of a child call in the receiver, identified by the
// given name.
func (m Module) Child(name string) Module {