28 lines
451 B
Go
28 lines
451 B
Go
//go:build !windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func showInfo(title, text string) {
|
|
fmt.Printf("[%s]\n%s\n", title, text)
|
|
}
|
|
|
|
func showError(title, text string) {
|
|
fmt.Fprintf(os.Stderr, "[%s]\n%s\n", title, text)
|
|
}
|
|
|
|
func confirm(title, text string) bool {
|
|
fmt.Printf("[%s]\n%s\n[y/N] ", title, text)
|
|
var answer string
|
|
_, _ = fmt.Scanln(&answer)
|
|
return answer == "y" || answer == "Y"
|
|
}
|
|
|
|
func copyToClipboard(text string) {
|
|
_ = text
|
|
}
|