Skip to content

Commit

Permalink
fix return when words equals 1.
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
sanchitrk committed Sep 28, 2024
1 parent ce1cdd2 commit 1416dda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion namingo.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package namingo

import (
"math/rand"

"golang.org/x/text/cases"
"golang.org/x/text/language"
"math/rand"
)

const (
Expand Down Expand Up @@ -44,6 +45,7 @@ func Generate(words int, sep string, tf string) string {
var rs string
if words == 1 {
rs = Name()
return rs
}
rs = Adjective() + sep + Name()

Expand Down

0 comments on commit 1416dda

Please sign in to comment.