From 58bb9ea1402e2b4befed4cbcb7db89bcda3e3ee4 Mon Sep 17 00:00:00 2001 From: jienfak Date: Sun, 3 May 2020 05:59:39 +0500 Subject: [PATCH] yes: "-N" option implemented. --- yes/yes.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/yes/yes.go b/yes/yes.go index caa9af1..515ed58 100644 --- a/yes/yes.go +++ b/yes/yes.go @@ -8,10 +8,19 @@ import( "strings" "github.com/jienfak/goblin/input" ) +var( + nArg int +) func yes(s string){ - for{ - fmt.Print(s) + if nArg<0{ + for{ + fmt.Print(s) + } + } else { + for i:=0 ; i