Add yes
This commit is contained in:
parent
62b8613877
commit
0c61aa0694
@ -10,3 +10,4 @@ Implemeted utilities:
|
|||||||
|
|
||||||
* `true`
|
* `true`
|
||||||
* `false`
|
* `false`
|
||||||
|
* `yes`
|
||||||
|
20
yes/yes.go
Normal file
20
yes/yes.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func yes(word string) {
|
||||||
|
for {
|
||||||
|
fmt.Println(word)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
if len(os.Args) == 1 {
|
||||||
|
yes("y")
|
||||||
|
} else {
|
||||||
|
yes(os.Args[1])
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user