File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,7 @@ func TestBannedPackages(t *testing.T) {
40
40
if strings .Contains (nmout .String (), "T cloud.google.com/" ) {
41
41
t .Errorf ("%s contains Google Cloud packages, even though it's for AWS" , name )
42
42
}
43
+ if strings .Contains (nmout .String (), "T go.etcd.io/bbolt." ) {
44
+ t .Errorf ("%s imports go.etcd.io/bbolt, even though it's for AWS" , name )
45
+ }
43
46
}
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ import (
13
13
)
14
14
15
15
// Factory represents a type for functions that produce a store for the
16
- // randomizer to use for a given "partition" (e.g. Slack channel).
16
+ // randomizer to use for a given "partition" (e.g. Slack channel). Factories
17
+ // may panic if a non-empty partition is required and not given.
17
18
//
18
- // A Factory may panic if it requires a non-empty partition and no partition is
19
- // given.
19
+ // Factory is provided for documentation purposes. Do not import the store
20
+ // package just to use this alias; this will link support for all possible
21
+ // store backends into the final program, even if this was not intended.
20
22
type Factory = func (partition string ) randomizer.Store
21
23
22
- // FactoryFromEnv constructs and returns a Factory based on available
24
+ // FactoryFromEnv constructs and returns a [ Factory] based on available
23
25
// environment variables. If a known DynamoDB environment variable is set, it
24
26
// will return a DynamoDB store. Otherwise, it will return a bbolt store.
25
27
func FactoryFromEnv (ctx context.Context ) (func (string ) randomizer.Store , error ) {
You can’t perform that action at this time.
0 commit comments