From 1f0d9ec8452f15c27cd33c4e3874454c35993743 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 8 Apr 2025 14:37:33 +0200 Subject: Use internal/pkg structure --- internal/network/session.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 internal/network/session.go (limited to 'internal/network/session.go') diff --git a/internal/network/session.go b/internal/network/session.go new file mode 100644 index 0000000..a4f60aa --- /dev/null +++ b/internal/network/session.go @@ -0,0 +1,23 @@ +package network + +import ( + "math/rand" +) + +var adjectives = []string{ + "adamant", "adept", "adventurous", "arcadian", "auspicious", + "awesome", "blossoming", "brave", "charming", "chatty", + "circular", "considerate", "cubic", "curious", "delighted", +} + +var nouns = []string{ + "aardvark", "accordion", "apple", "apricot", "bee", + "brachiosaur", "cactus", "capsicum", "clarinet", "cowbell", + "crab", "cuckoo", "cymbal", "diplodocus", "donkey", +} + +func NewSession() string { + noun := nouns[rand.Intn(len(nouns))] + adjective := adjectives[rand.Intn(len(adjectives))] + return noun + "-" + adjective +} -- cgit v1.2.3-18-g5258