Skip to content

Commit 0a92dab

Browse files
committed
Moving to go 1.23
Signed-off-by: Jean-Laurent de Morlhon <[email protected]>
1 parent 272c8ee commit 0a92dab

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

Readme.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Kamoulox
22

3-
*very* simple [kamoulox](https://fr.wikipedia.org/wiki/Kamoulox) style generator.
3+
_very_ simple [kamoulox](https://fr.wikipedia.org/wiki/Kamoulox) style generator.
44

55
try it with docker : `docker run jeanlaurent/kamoulox`
66

7-
87
Example:
8+
99
```
1010
> docker run jeanlaurent/kamoulox
1111
Je photocopie un seau et je déneige un palmier.
1212
```
13+
1314
[![Docker Image CI](https://github.com/jeanlaurent/kamoulox/actions/workflows/docker-image.yml/badge.svg)](https://github.com/jeanlaurent/kamoulox/actions/workflows/docker-image.yml)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module jeanlaurent/kamoulox
22

3-
go 1.17
3+
go 1.23

main.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@ package main
33
import (
44
"fmt"
55
"math/rand"
6-
"time"
76
"unicode"
87
)
98

109
func main() {
11-
rand.Seed(time.Now().Unix())
1210
kamoulox := Kamoulox{}
13-
fmt.Println(kamoulox.generate())
11+
fmt.Println(kamoulox.Generate())
1412
}
1513

16-
// Kamoulox generates down a famous kamoulox sentence
14+
// Kamoulox generates a famous kamoulox sentence
1715
type Kamoulox struct{}
1816

19-
func (k *Kamoulox) generate() string {
17+
func (k *Kamoulox) Generate() string {
2018
firstVerb := randomElementFrom(verbs)
2119
firstObject := randomElementFrom(objects)
2220
return fmt.Sprintf("%s %s et %s %s.", capitalizeFirst(firstVerb), firstObject, randomElementFromExcluding(verbs, firstVerb), randomElementFromExcluding(objects, firstObject))

0 commit comments

Comments
 (0)