dialog

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

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

Go to latest
Published: Nov 3, 2020 License: MIT-0 Imports: 4 Imported by: 9

README

dialog - simple cross-platform messagebox

go get "tawesoft.co.uk/go/"
import "tawesoft.co.uk/go/dialog"
Links License Stable?
homedocssrc MIT-0 ✔ yes

About

Package dialog implements simple cross platform native MessageBox/Alert dialogs for Go.

Currently, only supports Windows and Linux targets.

On Linux, uses (in order of preference) zenity, xmessage, or stdio.

Example

Usage is quite simple:

package main

import "tawesoft.co.uk/go/dialog"

func main() {
    dialog.Alert("Hello world!")
    dialog.Alert("There are %d lights", 4)
}

Changes

2019-11-16
  • Fix incorrect formatting of multiple arguments in Linux stdio fallback
2019-10-16
  • Remove title argument from Alert function
2019-10-01
  • Fix string formatting bug in Windows build
2019-10-01
  • Support Unicode in UTF16 Windows dialogs
  • Use "golang.org/x/sys/windows" to provide WinAPI
  • Removes CGO and windows.h implementation
  • Linux stdio fallback alert no longer blocks waiting for input
2019-09-30
  • First release

Getting Help

This package is part of tawesoft.co.uk/go, a monorepo for small Go modules maintained by Tawesoft®. Check out that URL for more information about other Go modules from Tawesoft plus community and commercial support options.

Documentation

Overview

Package dialog implements simple cross platform native MessageBox/Alert dialogs for Go.

Currently, only supports Windows and Linux targets.

On Linux, uses (in order of preference) `zenity`, `xmessage`, or stdio.

Example

Usage is quite simple:

package main

import "tawesoft.co.uk/go/dialog"

func main() {
    dialog.Alert("Hello world!")
    dialog.Alert("There are %d lights", 4)
}

Package Information

License: MIT-0 (see LICENSE.txt)

Stable: yes

For more information, documentation, source code, examples, support, links, etc. please see https://www.tawesoft.co.uk/go and https://www.tawesoft.co.uk/go/dialog

2019-11-16

    * Fix incorrect formatting of multiple arguments in Linux stdio fallback

2019-10-16

    * Remove title argument from Alert function

2019-10-01

    * Fix string formatting bug in Windows build

2019-10-01

    * Support Unicode in UTF16 Windows dialogs
    * Use "golang.org/x/sys/windows" to provide WinAPI
    * Removes CGO and windows.h implementation
    * Linux stdio fallback alert no longer blocks waiting for input

2019-09-30

    * First release

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alert

func Alert(message string, args ...interface{})

Alert displays a modal message box with message. The message string can be a printf-style format string for an optional sequence of additional arguments of any type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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