Comment by atombender
1 day ago
I frequently use that pattern. For example, something like this:
a := Start()
if thingEnabled {
thing := connectToThing()
defer thing.Close()
a.SetThing(thing)
}
a.Run(ctx)
1 day ago
I frequently use that pattern. For example, something like this:
a := Start()
if thingEnabled {
thing := connectToThing()
defer thing.Close()
a.SetThing(thing)
}
a.Run(ctx)
No comments yet
Contribute on Hacker News ↗