Skip to content

Commit 473b333

Browse files
committed
Elide stop() function into its caller
Signed-off-by: Bryan Boreham <[email protected]>
1 parent 70da0e7 commit 473b333

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pkg/cortex/cortex.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,17 +221,13 @@ func (t *Cortex) Run() error {
221221

222222
// Stop gracefully stops a Cortex.
223223
func (t *Cortex) Stop() error {
224-
t.stop(t.target)
225-
return nil
226-
}
227-
228-
func (t *Cortex) stop(m moduleName) {
229-
t.stopModule(m)
230-
deps := orderedDeps(m)
224+
t.stopModule(t.target)
225+
deps := orderedDeps(t.target)
231226
// iterate over our deps in reverse order and call stopModule
232227
for i := len(deps) - 1; i >= 0; i-- {
233228
t.stopModule(deps[i])
234229
}
230+
return nil
235231
}
236232

237233
func (t *Cortex) stopModule(m moduleName) {

0 commit comments

Comments
 (0)