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

github.com/jiazhoulvke/gui-dialog

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/jiazhoulvke/gui-dialog

  • v1.0.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

cross-platform gui dialog program. base on https://github.com/sqweek/dialog

  • show message
  • select file
  • select directory

Installation

requirements:

  • OSX: uses Cocoa's NSAlert/NSSavePanel/NSOpenPanel classes

  • Win32: uses MessageBox/GetOpenFileName/GetSaveFileName (via package github.com/TheTitanrain/w32)

  • Linux: uses Gtk's MessageDialog/FileChooserDialog (via cgo; requires gtk3 development packages)

    • Ubuntu

      sudo apt install libgtk-3-dev
      

install gui-dialog:

go install github.com/jiazhoulvke/gui-dialog@latest

Usage

Usage of gui-dialog:
      --file_dialog_type string      load,save (default "load")
      --filter strings               file filter. example: jpg,png,gif
      --filter_desc string           file filter description. example: pictures
      --message_dialog_type string   info,error,yes_or_no (default "info")
  -m, --msg string                   message info
  -o, --output_type string           json,text (default "text")
  -d, --start_dir string             start directory
      --start_file string            start file
      --title string                 title
  -t, --type string                  file,dir,msg (default "file")

Message

Info Message

gui-dialog -t msg --title=greeting --msg="你好,世界!"

msg info

Error Message

gui-dialog -t msg --message_dialog_type=error --title="Alert!" --msg="dangerous"

msg error

Yes Or No

gui-dialog -t msg --message_dialog_type=yes_or_no --msg="Are you ok?" -o json

msg yes or no

console output:

{ "value": true, "error": "" }
gui-dialog -t msg --message_dialog_type=yes_or_no --msg="Are you ok?" -o text

console output:

true

File

gui-dialog --start_file="C:\Windows\System32\help.exe" --filter_desc="programs" --filter="exe" -o json

file

console output:

{ "value": "C:\\Windows\\System32\\help.exe", "error": "" }

if canceled, console output:

{ "value": "", "error": "Cancelled" }

Directory

gui-dialog -t dir --start_dir="C:\Windows\System32\"

dir

FAQs

Package last updated on 19 Oct 2022

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