mirror of
https://github.com/rwinkhart/convertroman.git
synced 2026-10-26 20:29:56 -04:00
updated example in readme
This commit is contained in:
1 parent
ffcc16a44f
commit
0dfcd83c85
1 file changed
+9
-2
@@ -3,8 +3,15 @@
|
||||
Convert to and from roman numerals in Go.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/brandenc40/romannumeral"
|
||||
)
|
||||
|
||||
func ExampleToInt() {
|
||||
integer, err := ToInt("IV")
|
||||
integer, err := romannumeral.ToInt("IV")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -12,7 +19,7 @@ func ExampleToInt() {
|
||||
}
|
||||
|
||||
func ExampleFromInt() {
|
||||
roman, err := FromInt(4)
|
||||
roman, err := romannumeral.FromInt(4)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user