Skip to content

Commit

Permalink
fix: variable shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
fschade committed Aug 3, 2023
1 parent 9638dd5 commit 06613d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions services/policies/pkg/engine/opa/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ type OPA struct {

// NewOPA returns a ready to use opa engine.
func NewOPA(timeout time.Duration, logger log.Logger, conf config.Engine) (OPA, error) {
var mtReader io.Reader
var mtReader io.ReadCloser

if conf.Mimes != "" {
mtReader, err := os.Open(conf.Mimes)
var err error
mtReader, err = os.Open(conf.Mimes)
if err != nil {
return OPA{}, err
}

defer mtReader.Close()
}

Expand Down

0 comments on commit 06613d3

Please sign in to comment.