File tree Expand file tree Collapse file tree 2 files changed +39
-6
lines changed Expand file tree Collapse file tree 2 files changed +39
-6
lines changed Original file line number Diff line number Diff line change @@ -249,3 +249,37 @@ var nouns = []string{
249249 "yard" ,
250250 "zone" ,
251251}
252+
253+ var themes = []string {
254+ "balance" ,
255+ "bliss" ,
256+ "breeze" ,
257+ "calm" ,
258+ "cascade" ,
259+ "cheer" ,
260+ "dream" ,
261+ "drift" ,
262+ "echo" ,
263+ "flow" ,
264+ "flutter" ,
265+ "gleam" ,
266+ "glimmer" ,
267+ "glow" ,
268+ "harmony" ,
269+ "hope" ,
270+ "hum" ,
271+ "joy" ,
272+ "journey" ,
273+ "lightness" ,
274+ "melody" ,
275+ "mirth" ,
276+ "peace" ,
277+ "radiance" ,
278+ "rhythm" ,
279+ "ripple" ,
280+ "serenity" ,
281+ "shine" ,
282+ "sparkle" ,
283+ "vibe" ,
284+ "whisper" ,
285+ }
Original file line number Diff line number Diff line change 11package store
22
33import (
4- "fmt"
54 "math/rand/v2"
65 "os"
76 "regexp"
@@ -40,11 +39,11 @@ func ValidateName(s string) (string, error) {
4039
4140func GenerateName (txn * Txn ) (string , error ) {
4241 var name string
43- for i := range 6 {
44- name = adjectives [rand .IntN (len (adjectives ))] + "_" + nouns [ rand . IntN ( len ( nouns ))] // #nosec G404 -- ignore "Use of weak random number generator"
45- if i > 0 {
46- name += fmt . Sprint ( rand .IntN (10 )) // #nosec G404 -- ignore "Use of weak random number generator"
47- }
42+ for range 6 {
43+ name = adjectives [rand .IntN (len (adjectives ))] + "_" +
44+ nouns [ rand . IntN ( len ( nouns ))] + "_" +
45+ themes [ rand .IntN (len ( themes ))] // #nosec G404 -- ignore "Use of weak random number generator"
46+
4847 if _ , err := txn .NodeGroupByName (name ); err != nil {
4948 if ! os .IsNotExist (errors .Cause (err )) {
5049 return "" , err
You can’t perform that action at this time.
0 commit comments