mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-24 06:40:50 +01:00
Refactor variable initialization in generateBinary function
This commit refactors the way the 'length' variable is initialized in the generateBinary function of the Generator struct in random.go. Notably, it makes use of Go's type inference feature to eliminate the need to explicitly declare the variable type.
This commit is contained in:
parent
acadccc84a
commit
c8a4cf2837
1 changed files with 1 additions and 1 deletions
|
@ -321,7 +321,7 @@ func (g *Generator) generatePronounceable() (string, error) {
|
|||
// generateBinary is executed when Generate() is called with Algorithm set
|
||||
// to AlgoBinary
|
||||
func (g *Generator) generateBinary() (string, error) {
|
||||
var length int64 = DefaultBinarySize
|
||||
length := DefaultBinarySize
|
||||
if g.config.FixedLength > 0 {
|
||||
length = g.config.FixedLength
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue