Skip to content

Commit f0ab179

Browse files
authored
Merge pull request #2072 from Adirio/fix-config-registry-api
🌱 Fix the config registry public API
2 parents 8e0f0ab + 01293b2 commit f0ab179

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pkg/config/registry.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ limitations under the License.
1616

1717
package config
1818

19-
type constructorFunc func() Config
20-
2119
var (
22-
registry = make(map[Version]constructorFunc)
20+
registry = make(map[Version]func() Config)
2321
)
2422

2523
// Register allows implementations of Config to register themselves so that they can be created with New
26-
func Register(version Version, constructor constructorFunc) {
24+
func Register(version Version, constructor func() Config) {
2725
registry[version] = constructor
2826
}
2927

pkg/config/resgistry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var _ = Describe("registry", func() {
2828
)
2929

3030
AfterEach(func() {
31-
registry = make(map[Version]constructorFunc)
31+
registry = make(map[Version]func() Config)
3232
})
3333

3434
Context("Register", func() {

0 commit comments

Comments
 (0)