You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/xyproto/dialog

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/xyproto/dialog

v1.1.1
Source
Go
Version published
Created
Source

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

FAQs

Package last updated on 10 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts