Skip to content

Commit

Permalink
spec: global: initialize target objects
Browse files Browse the repository at this point in the history
Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
  • Loading branch information
metux committed Jan 12, 2024
1 parent f4617b7 commit 97cb08d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/global/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ func (g Global) Init() {
// init features
fm := g.GetFeatureMap()
fm.Init()

// init targets
for _, t := range g.GetTargetObjects() {
t.Init()
}
}

func (g Global) PostConfig() {
Expand Down
4 changes: 4 additions & 0 deletions spec/target/targetobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ func (o TargetObject) LoadTargetDefaults() {
o.loadTargetType(o.Type())
}

func (o TargetObject) Init() {
o.LoadTargetDefaults()
}

func (o TargetObject) CDefines() []string {
return o.FeaturedStrList(KeyCDefines)
}
Expand Down

0 comments on commit 97cb08d

Please sign in to comment.