New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/hultan/dialog

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/hultan/dialog

  • v1.0.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

DIALOG

A simple message dialog package.

Usage:

This package needs GoTK3 (GTK) to run (see link below), and you will need to run gtk.Init() somewhere in your application, before using the dialogs.

// Initialize gtk
gtk.Init(&os.Args)

// Super simple dialog
dialog.Title("Hello World!").OkButton().Show()

// Normal dialog
dialog.Title("Hello World!").Text("How are you today?").OkButton().Show()

// Question dialog
response := dialog.Title("Hello World!").
    Text("How are you today?").
    Extra(getLongText()).
    QuestionIcon().
    YesNoButtons().
    Height(400).
    Show()

if response == gtk.RESPONSE_YES {
    // Warning dialog
    dialog.Title("Your response...").
        Text("...was affirmative!").
        WarningIcon().
        OkButton().
        Width(400).
        Show()
} else {
    // Error dialog
    dialog.Title("Your response...").
        Text("...was very negative!").
        ErrorIcon().
        OkButton().
        Width(400).
        Show()
}
  • Source of inspiration: https://github.com/sqweek/dialog
  • GoTK3 : https://github.com/gotk3/gotk3

TODO

  • Choose between smaller and larger icons

FAQs

Package last updated on 02 Feb 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc