inputbox

package module
v0.0.0-...-b26136a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 2 Imported by: 7

README

About

GoDoc

InputBox is a simple cross-platform library for displaying desktop dialog boxes in your go application

Example

package main

import "github.com/martinlindhe/inputbox"

func main() {
	got, ok := inputbox.InputBox("Dialog title", "Type a number", "abc")
	if ok {
		fmt.Println("you entered:", got)
	} else {
		fmt.Println("No value entered")
	}
}
Windows

Uses a powershell script

Windows

macOS

Uses a osascript

macOS

Linux

Uses zenity (gtk)

Linux

More

If you like this, check out https://github.com/martinlindhe/notify for cross-platform desktop notifications.

License

Under MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputBox

func InputBox(title, message, defaultAnswer string) (string, bool)

InputBox displays a dialog box, returning the entered value and a bool for success

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL