New*(): don't re-do Init()

This commit is contained in:
Alexander A. Klimov 2021-03-10 16:36:40 +01:00
parent 8cd62118b2
commit cf2fdfe381
2 changed files with 2 additions and 10 deletions

View file

@ -43,11 +43,7 @@ type Host struct {
}
func NewHost() contracts.Entity {
h := &Host{}
// TODO(el): Interfacify!
h.NameCi = &h.Name
return h
return &Host{}
}
// Assert interface compliance.

View file

@ -11,11 +11,7 @@ type Service struct {
}
func NewService() contracts.Entity {
s := &Service{}
// TODO(el): Interfacify!
s.NameCi = &s.Name
return s
return &Service{}
}
// Assert interface compliance.