You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"fmt"
"github.com/gobuffalo/flect"
)
func main() {
orig := "CNS"
result := flect.Pluralize(orig)
fmt.Printf("plural of %s is: %s\n", orig, result)
orig = "cns"
result = flect.Pluralize(orig)
fmt.Printf("plural of %s is: %s\n", orig, result)
orig = "DNS"
result = flect.Pluralize(orig)
fmt.Printf("plural of %s is: %s\n", orig, result)
orig = "dns"
result = flect.Pluralize(orig)
fmt.Printf("plural of %s is: %s\n", orig, result)
orig = "ENS"
result = flect.Pluralize(orig)
fmt.Printf("plural of %s is: %s\n", orig, result)
orig = "ens"
result = flect.Pluralize(orig)
fmt.Printf("plural of %s is: %s\n", orig, result)
}
Which will output:
plural of CNS is: CNSes
plural of cns is: cns
plural of DNS is: DNSes
plural of dns is: dnsDNSes
plural of ENS is: ENSes
plural of ens is: ens
Expected Behavior
I expect "dns" to behave the same as cns and ens to become dns NOT dnsDNSes
Actual Behavior
dns becomes dnsDNSes which doesn't seem correct and isn't the same as other similar 3 character strings.
Yes, DNS is the acronym for Domain Name System, but its plural should not result in lower case followed by uppercase right?
To Reproduce
Build the given go program using the latest release of flect
Run the program and observe the output to stdout
My test go.mod file is:
module flect-test
go 1.22.1
require github.com/gobuffalo/flect v1.0.2
Additional Context
Details: my example go.mod file is
module flect-test
go 1.22.1
require github.com/gobuffalo/flect v1.0.2
Which shows the flect version a v1.0.2
The text was updated successfully, but these errors were encountered:
Description
Description
Consider the example program:
Which will output:
Expected Behavior
I expect "dns" to behave the same as cns and ens to become
dns
NOTdnsDNSes
Actual Behavior
dns
becomesdnsDNSes
which doesn't seem correct and isn't the same as other similar 3 character strings.Yes, DNS is the acronym for Domain Name System, but its plural should not result in lower case followed by uppercase right?
To Reproduce
Build the given go program using the latest release of
flect
Run the program and observe the output to
stdout
My test
go.mod
file is:Additional Context
Details: my example
go.mod
file isWhich shows the
flect
version av1.0.2
The text was updated successfully, but these errors were encountered: