zlacker

[parent] [thread] 0 comments
1. atombe+(OP)[view] [source] 2025-08-22 21:17:13
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)
[go to top]