Skip to content

Commit

Permalink
fix: make options private to enable changes later
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfeidau committed Jan 27, 2024
1 parent da70023 commit 595e0af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ var (

// WithAwsConfig sets the AWS configuration for the catalog.
func WithAwsConfig(cfg aws.Config) Option {
return func(o *Options) {
return func(o *options) {
o.awsConfig = cfg
}
}

type Option func(*Options)
type Option func(*options)

type Options struct {
type options struct {
awsConfig aws.Config
}

Expand Down
6 changes: 3 additions & 3 deletions catalog/glue.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ type GlueCatalog struct {
}

func NewGlueCatalog(opts ...Option) *GlueCatalog {
options := &Options{}
glueOps := &options{}

for _, o := range opts {
o(options)
o(glueOps)
}

return &GlueCatalog{
glueSvc: glue.NewFromConfig(options.awsConfig),
glueSvc: glue.NewFromConfig(glueOps.awsConfig),
}
}

Expand Down

0 comments on commit 595e0af

Please sign in to comment.