Skip to content

Commit d0e0848

Browse files
committed
[no-relnote] Rename path member to topLevelConfigPath for clarity
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent f49c5dc commit d0e0848

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

pkg/config/engine/containerd/containerd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func New(opts ...Option) (engine.Interface, error) {
8080
b.logger = logger.New()
8181
}
8282
if b.configSource == nil {
83-
b.configSource = toml.FromFile(b.path)
83+
b.configSource = toml.FromFile(b.topLevelConfigPath)
8484
}
8585

8686
tomlConfig, err := b.configSource.Load()

pkg/config/engine/containerd/option.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type builder struct {
2626
configSource toml.Loader
2727
configVersion int
2828
useLegacyConfig bool
29-
path string
29+
topLevelConfigPath string
3030
runtimeType string
3131
containerAnnotations []string
3232
}
@@ -44,7 +44,7 @@ func WithLogger(logger logger.Interface) Option {
4444
// WithPath sets the path for the config builder
4545
func WithPath(path string) Option {
4646
return func(b *builder) {
47-
b.path = path
47+
b.topLevelConfigPath = path
4848
}
4949
}
5050

pkg/config/engine/crio/crio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func New(opts ...Option) (engine.Interface, error) {
5959
b.logger = logger.New()
6060
}
6161
if b.configSource == nil {
62-
b.configSource = toml.FromFile(b.path)
62+
b.configSource = toml.FromFile(b.topLevelConfigPath)
6363
}
6464

6565
tomlConfig, err := b.configSource.Load()

pkg/config/engine/crio/option.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import (
2222
)
2323

2424
type builder struct {
25-
logger logger.Interface
26-
configSource toml.Loader
27-
path string
25+
logger logger.Interface
26+
configSource toml.Loader
27+
topLevelConfigPath string
2828
}
2929

3030
// Option defines a function that can be used to configure the config builder
@@ -40,7 +40,7 @@ func WithLogger(logger logger.Interface) Option {
4040
// WithPath sets the path for the config builder
4141
func WithPath(path string) Option {
4242
return func(b *builder) {
43-
b.path = path
43+
b.topLevelConfigPath = path
4444
}
4545
}
4646

0 commit comments

Comments
 (0)