Commit 9df2d7f
authored
chore: simplify init functions (observatorium#863)
This commit removes the init() function which initializes the
`providerFactories` variable. This mechanism is fragile because it
assumes that no other init() function will call `onboardNewProvider()`
before the map is initialized. In practice the Go compiler evaluates the
init() functions from a single package in lexical filename order meaning
that we could have a Go file evaluated before
`authentication/authentication.go` in the future.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>1 parent 0689ccb commit 9df2d7f
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 22 | | |
27 | 23 | | |
28 | 24 | | |
29 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
0 commit comments