mirror of https://github.com/01-edu/public.git
docs(lastword): update provided example to be clearer
This commit is contained in:
parent
1f6f72bf91
commit
e3251487b7
|
@ -22,15 +22,14 @@ Here is a possible program to test your function :
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"piscine"
|
"piscine"
|
||||||
|
|
||||||
"github.com/01-edu/z01"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
z01.PrintRune(piscine.LastWord("this ... is sparta, then again, maybe not"))
|
fmt.Print(piscine.LastWord("this ... is sparta, then again, maybe not"))
|
||||||
z01.PrintRune(piscine.LastWord(" "))
|
fmt.Print(piscine.LastWord(" lorem,ipsum "))
|
||||||
z01.PrintRune(piscine.LastWord(" lorem,ipsum "))
|
fmt.Print(piscine.LastWord(" "))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -39,9 +38,9 @@ And its output :
|
||||||
```console
|
```console
|
||||||
$ go run . | cat -e
|
$ go run . | cat -e
|
||||||
not$
|
not$
|
||||||
$
|
|
||||||
lorem,ipsum$
|
lorem,ipsum$
|
||||||
$
|
$
|
||||||
|
$
|
||||||
```
|
```
|
||||||
|
|
||||||
### Notions
|
### Notions
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"piscine"
|
"piscine"
|
||||||
|
|
||||||
"github.com/01-edu/z01"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
z01.PrintRune(piscine.LastWord("this ... is sparta, then again, maybe not"))
|
fmt.Print(piscine.LastWord("this ... is sparta, then again, maybe not"))
|
||||||
z01.PrintRune(piscine.LastWord(" "))
|
fmt.Print(piscine.LastWord(" lorem,ipsum "))
|
||||||
z01.PrintRune(piscine.LastWord(" lorem,ipsum "))
|
fmt.Print(piscine.LastWord(" "))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue