🚨 A bunch of small improvements from linter
This commit is contained in:
parent
480e36763f
commit
8f02956ecd
10 changed files with 51 additions and 47 deletions
|
|
@ -21,7 +21,7 @@ func (g Generator) MakeWithConfig(c Config) (string, error) {
|
|||
return Make(c.AddOptions(WithGenerator(g)))
|
||||
}
|
||||
|
||||
// WithGenerator sets the specified generator
|
||||
// WithGenerator sets the specified generator.
|
||||
func WithGenerator(g Generator) Option {
|
||||
return func(c *Config) {
|
||||
c.generator = g
|
||||
|
|
@ -66,6 +66,7 @@ func MultiGeneratorRandomOrder(gens ...Generator) Generator {
|
|||
}
|
||||
|
||||
return func(c *Config) (string, error) {
|
||||
//nolint:gosec // This is not security sensitive, so a weak number generator is fine.
|
||||
idx := rand.Int() % len(gens)
|
||||
return gens[idx](c)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue