mirror of
https://codeberg.org/scip/gfn.git
synced 2025-12-16 18:30:57 +01:00
fixed linting errors
This commit is contained in:
@@ -20,16 +20,12 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"math/rand"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
fn "github.com/s0rg/fantasyname"
|
fn "github.com/s0rg/fantasyname"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Actual fantasy name generation
|
// Actual fantasy name generation
|
||||||
func Generate(conf *Config) ([]string, error) {
|
func Generate(conf *Config) ([]string, error) {
|
||||||
rand.Seed(time.Now().UnixNano())
|
|
||||||
|
|
||||||
// we register each generated word to avoid duplicates, which
|
// we register each generated word to avoid duplicates, which
|
||||||
// naturally happens every while
|
// naturally happens every while
|
||||||
reg := map[string]int{}
|
reg := map[string]int{}
|
||||||
@@ -73,7 +69,7 @@ func Generate(conf *Config) ([]string, error) {
|
|||||||
names := make([]string, len(reg))
|
names := make([]string, len(reg))
|
||||||
|
|
||||||
i := 0
|
i := 0
|
||||||
for k, _ := range reg {
|
for k := range reg {
|
||||||
names[i] = k
|
names[i] = k
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user