Add onboard command
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user