diff --git a/tables/sofa/sofa_cves.go b/tables/sofa/sofa_cves.go index 38fa348..53844b9 100644 --- a/tables/sofa/sofa_cves.go +++ b/tables/sofa/sofa_cves.go @@ -25,7 +25,7 @@ func SofaUnpatchedCVEsColumns() []table.ColumnDefinition { } } -func SofaUnpatchedCVEsGenerate(ctx context.Context, queryContext table.QueryContext, socketPath string) ([]map[string]string, error) { +func SofaUnpatchedCVEsGenerate(ctx context.Context, queryContext table.QueryContext, socketPath string, opts ...Option) ([]map[string]string, error) { url := SofaV1URL if constraintList, present := queryContext.Constraints["url"]; present { // 'url' is in the where clause @@ -61,7 +61,12 @@ func SofaUnpatchedCVEsGenerate(ctx context.Context, queryContext table.QueryCont } } - client, err := NewSofaClient(WithURL(url)) + defaultOpts := []Option{ + WithURL(url), + } + opts = append(opts, defaultOpts...) + + client, err := NewSofaClient(opts...) if err != nil { return nil, err }