mirror of
https://github.com/rwinkhart/convertroman.git
synced 2026-08-28 04:46:32 -04:00
301 B
301 B
Go Roman Numerals
Convert to and from roman numerals in Go.
func ExampleToInt() {
integer, err := ToInt("IV")
if err != nil {
panic(err)
}
fmt.Println(integer == 4)
}
func ExampleFromInt() {
roman, err := FromInt(4)
if err != nil {
panic(err)
}
fmt.Println(roman == "IV")
}