From d3c998ed96adb070e5dfe38c5fac812d503c890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sun, 23 Jan 2022 23:31:23 +0100 Subject: Enguarde -> Engarde --- .github/workflows/release.yml | 6 +++--- go.mod | 2 +- main.go | 11 ++++++----- types.go | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a898d96..1df3513 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,12 +42,12 @@ jobs: run: go vet ./... - name: Release Build (Linux) - run: go build -ldflags '-s -w' -o bin/enguarde-importer + run: go build -ldflags '-s -w' -o bin/engarde-importer env: GOOS: windows - name: Release Build (Windows) - run: go build -ldflags '-s -w -H=windowsgui' -o bin/enguarde-importer.exe + run: go build -ldflags '-s -w -H=windowsgui' -o bin/engarde-importer.exe env: GOOS: windows @@ -56,7 +56,7 @@ jobs: id: update-release with: token: ${{ secrets.GITHUB_TOKEN }} - files: bin/enguarde-importer bin/enguarde-importer.exe + files: bin/engarde-importer bin/engarde-importer.exe tag: release diff --git a/go.mod b/go.mod index 1ba569a..33b22ee 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/Necoro/enguarde-importer +module github.com/Necoro/engarde-importer go 1.17 diff --git a/main.go b/main.go index 395f244..e2ef1d7 100644 --- a/main.go +++ b/main.go @@ -11,8 +11,9 @@ import ( "github.com/jszwec/csvutil" ) -type enguarde interface { - enguarde() (string, error) +//goland:noinspection GoUnusedType +type engarde interface { + engarde() (string, error) } type participant struct { @@ -32,9 +33,9 @@ type club struct { id uint } -func (p participant) enguarde() (string, error) { +func (p participant) engarde() (string, error) { name := strings.ToUpper(p.LastName) - gender, err := p.Gender.enguarde() + gender, err := p.Gender.engarde() if err != nil { return "", err } @@ -46,7 +47,7 @@ func (p participant) enguarde() (string, error) { `, gender, name, p.FirstName, p.id, p.club.id), nil } -func (c club) enguarde() (string, error) { +func (c club) engarde() (string, error) { return fmt.Sprintf(` {[classe club] [nom "%s"] [modifie vrai] [date_oed "332"] [cle %d]}`, c.name, c.id), nil } diff --git a/types.go b/types.go index 82fd8e6..8c1538e 100644 --- a/types.go +++ b/types.go @@ -20,7 +20,7 @@ func (g Gender) String() string { } } -func (g Gender) enguarde() (string, error) { +func (g Gender) engarde() (string, error) { switch g { case GenderM: return "masculin", nil @@ -69,7 +69,7 @@ func (a AgeGroup) String() string { } } -func (a AgeGroup) enguarde() (string, error) { +func (a AgeGroup) engarde() (string, error) { switch a { case AgeVeteran: return "veteran", nil @@ -112,7 +112,7 @@ func (w Weapon) String() string { } } -func (w Weapon) enguarde() (string, error) { +func (w Weapon) engarde() (string, error) { switch w { case Epee: return "epee", nil -- cgit v1.2.3