Categorygithub.com/xyproto/dialog
repositorypackage
1.1.1
Repository: https://github.com/xyproto/dialog.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

dialog Build Status Go Report Card License

Simple wrapper for the dialog executable.

Online documentation

Screenshots

screenshot 1 screenshot 2

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