misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-20 11:16:01 +01:00
commit 3e8ae0339b
3 changed files with 125 additions and 81 deletions

View file

@ -80,6 +80,12 @@ func NewEndpoint(ip, mac string) *Endpoint {
return e
}
func NewEndpointWithAlias(ip, mac, alias string) *Endpoint {
e := NewEndpoint(ip, mac)
e.Alias = alias
return e
}
func (t *Endpoint) Name() string {
return t.Hostname
}