Skip to content

Commit

Permalink
docs(godoc): attempt to fix list Enumerator examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed May 16, 2024
1 parent 686f765 commit c8b1983
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions list/enumerations.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const abcLen = 26

// Alphabet is the enumeration for alphabetical listing.
//
// a. Foo
// b. Bar
// c. Baz
// d. Qux.
// a. Foo
// b. Bar
// c. Baz
// d. Qux.
func Alphabet(_ Data, i int) string {
if i >= abcLen*abcLen+abcLen {
return fmt.Sprintf("%c%c%c.", 'A'+i/abcLen/abcLen-1, 'A'+(i/abcLen)%abcLen-1, 'A'+i%abcLen)
Expand All @@ -25,10 +25,10 @@ func Alphabet(_ Data, i int) string {

// Arabic is the enumeration for arabic numerals listing.
//
// 1. Foo
// 2. Bar
// 3. Baz
// 4. Qux.
// 1. Foo
// 2. Bar
// 3. Baz
// 4. Qux.
func Arabic(_ Data, i int) string {
return fmt.Sprintf("%d.", i+1)
}
Expand Down Expand Up @@ -57,30 +57,30 @@ func Roman(_ Data, i int) string {

// Bullet is the enumeration for bullet listing.
//
// • Foo
// • Bar
// • Baz
// • Qux.
// • Foo

Check failure on line 60 in list/enumerations.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)

Check failure on line 60 in list/enumerations.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
// • Bar
// • Baz
// • Qux.
func Bullet(Data, int) string {
return "•"
}

// Asterisk is an enumeration using asterisks.
//
// * Foo
// * Bar
// * Baz
// * Qux.
// \* Foo
// \* Bar
// \* Baz
// \* Qux.
func Asterisk(Data, int) string {
return "*"
}

// Dash is an enumeration using dashes.
//
// - Foo
// - Bar
// - Baz
// - Qux.
// \- Foo
// \- Bar
// \- Baz
// \- Qux.
func Dash(Data, int) string {
return "-"
}

0 comments on commit c8b1983

Please sign in to comment.