Skip to content

Commit

Permalink
no need for a pointer to an interface
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispatrick committed Sep 5, 2024
1 parent f12f479 commit 0bc04a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions policy/data/fixed.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ type vulnerabilityFetcher func(ctx context.Context, evalCtx goals.GoalEvaluation

type fixedDataSource struct {
jynxGQLClient query.QueryClient
proxyClient *proxy.ProxyClient
proxyClient proxy.ProxyClient
vulnerabilities vulnerabilityFetcher
}

func NewFixedDataSource(jynxGQLClient query.QueryClient, proxyClient *proxy.ProxyClient, vulnerabilities vulnerabilityFetcher) DataSource {
func NewFixedDataSource(jynxGQLClient query.QueryClient, proxyClient proxy.ProxyClient, vulnerabilities vulnerabilityFetcher) DataSource {
return &fixedDataSource{
jynxGQLClient: jynxGQLClient,
proxyClient: proxyClient,
Expand All @@ -29,7 +29,7 @@ func (ds *fixedDataSource) GetQueryClient() query.QueryClient {
return ds.jynxGQLClient
}

func (ds *fixedDataSource) GetProxyClient() (*proxy.ProxyClient, error) {
func (ds *fixedDataSource) GetProxyClient() (proxy.ProxyClient, error) {
return ds.proxyClient, nil
}

Expand Down
2 changes: 1 addition & 1 deletion policy/data/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

type DataSource interface {
GetQueryClient() query.QueryClient
GetProxyClient() (*proxy.ProxyClient, error)
GetProxyClient() (proxy.ProxyClient, error)

GetImageVulnerabilities(ctx context.Context, evalCtx goals.GoalEvaluationContext, imageSbom types.SBOM) (*query.QueryResponse, []types.Package, map[string][]types.Vulnerability, error)
}

0 comments on commit 0bc04a6

Please sign in to comment.