File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 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) {
4040 if strings .Contains (nmout .String (), "T cloud.google.com/" ) {
4141 t .Errorf ("%s contains Google Cloud packages, even though it's for AWS" , name )
4242 }
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+ }
4346}
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ import (
1313)
1414
1515// 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.
1718//
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.
2022type Factory = func (partition string ) randomizer.Store
2123
22- // FactoryFromEnv constructs and returns a Factory based on available
24+ // FactoryFromEnv constructs and returns a [ Factory] based on available
2325// environment variables. If a known DynamoDB environment variable is set, it
2426// will return a DynamoDB store. Otherwise, it will return a bbolt store.
2527func FactoryFromEnv (ctx context.Context ) (func (string ) randomizer.Store , error ) {
You can’t perform that action at this time.
0 commit comments