Combine New/Setup functions
This commit is contained in:
committed by
=Michael Hohn
parent
f611f02d1c
commit
cd0647836e
@@ -29,8 +29,12 @@ type CommanderSingle struct {
|
||||
st *Visibles
|
||||
}
|
||||
|
||||
func NewCommanderSingle() *CommanderSingle {
|
||||
func NewCommanderSingle(st *Visibles) *CommanderSingle {
|
||||
c := CommanderSingle{}
|
||||
|
||||
c.st = st
|
||||
setupEndpoints(&c)
|
||||
|
||||
return &c
|
||||
}
|
||||
|
||||
@@ -38,8 +42,12 @@ type CommanderContainer struct {
|
||||
st *Visibles
|
||||
}
|
||||
|
||||
func NewCommanderContainer() *CommanderContainer {
|
||||
func NewCommanderContainer(st *Visibles) *CommanderContainer {
|
||||
c := CommanderContainer{}
|
||||
|
||||
c.st = st
|
||||
setupEndpoints(&c)
|
||||
|
||||
return &c
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user