dialog

Basic wrapper for the dialog executable

MIT License

Stars
5
Committers
1

dialog Build Status Go Report Card License

Simple wrapper for the dialog executable.

Online documentation

Screenshots

Features and limitations

Supports only these types:

  • Message box
  • Yes/No box
  • Menu box

Example use

package main

import (
	"fmt"
	"github.com/xyproto/dialog"
)

func main() {
	d := dialog.New(80, 24)
	answeredYes, err := d.YesNo("Do you want cake?")
	if err != nil {
		panic(err)
	}
	if answeredYes {
		fmt.Println("You answered: yes")
		fmt.Println("The cake is a lie. Haha!")
	} else {
		fmt.Println("You answered: no")
		fmt.Println("Fine.")
	}
}

Requirements

  • Go >= 1.3

General info