Add onboard command

This commit is contained in:
Arturo Filastò
2018-06-25 16:31:44 +02:00
parent 38a5637cf5
commit 7951ee6bb5
7 changed files with 257 additions and 35 deletions
+19
View File
@@ -1,9 +1,13 @@
package output
import (
"bufio"
"fmt"
"os"
"time"
"github.com/apex/log"
"github.com/ooni/probe-cli/internal/util"
)
// Progress logs a progress type event
@@ -76,3 +80,18 @@ func SectionTitle(text string) {
"title": text,
}).Info(text)
}
func Paragraph(text string) {
const width = 80
fmt.Println(util.WrapString(text, width))
}
func Bullet(text string) {
const width = 80
fmt.Printf("• %s\n", util.WrapString(text, width))
}
func PressEnterToContinue(text string) {
fmt.Print(text)
bufio.NewReader(os.Stdin).ReadBytes('\n')
}