1 package f2 2 3 type Option = func(*options) 4 5 // WithExtensions initializes the [Framework] with the provided extensions, 6 // allowing reusable test code to handle things like binding flags, registering 7 // test lifecycle functions, etc for the user. 8 func WithExtensions(ext ...Extension) Option { 9 return func(o *options) { 10 o.extensions = ext 11 } 12 } 13 14 type options struct { 15 extensions []Extension 16 } 17 18 func makeOptions(opts ...Option) options { 19 o := options{} 20 for _, opt := range opts { 21 opt(&o) 22 } 23 return o 24 } 25