Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/alphabyte02/go-toast

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/alphabyte02/go-toast

  • v0.0.0-20240928123725-fc502fb7c5d0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Golang-Toast

license

cross-platform library for sending desktop notifications

Installation

go get github.com/AlphaBye02/go-toast

Example

  • Common invocation

    package main
    
    import (
        "github.com/alphabyte02/go-toast"
    )
    
    func main() {
        // _ = toast.Push("test message")
        _ = toast.Push("test message", toast.WithTitle("app title"))
    }
    
    
  • macOS

    package main
    
    import (
        "github.com/alphabyte02/go-toast"
    )
    
    func main() {
        // _ = toast.Push("test message")
        // _ = toast.Push("test message", toast.WithTitle("app title"))
        _ = toast.Push("test message",
            toast.WithTitle("app title"),
            toast.WithSubtitle("app sub title"),
            toast.WithAudio(toast.Ping),
            // toast.WithObjectiveC(true),
        )
    }
    
    
  • Windows

    package main
    
    import (
        "github.com/alphabyte02/go-toast"
    )
    
    func main() {
        // _ = toast.Push("test message")
        // _ = toast.Push("test message", toast.WithTitle("app title"))
        _ = toast.Push("test message",
            toast.WithTitle("app title"),
            toast.WithAppID("app id"),
            toast.WithAudio(toast.Default),
            toast.WithLongDuration(),
            toast.WithIcon("/path/icon.png"),
        )
        // bs, err := os.ReadFile("/path/icon.png")
        // if err != nil {
        // 	log.Fatalln(err)
        // }
        // toast.WithIconRaw(bs)
    }
    
    
  • js && wasm

    package main
    
    import (
        "fmt"
        "github.com/alphabyte02/go-toast"
    )
    
    func main() {
        // _ = toast.Push("test message")
        // _ = toast.Push("test message", toast.WithTitle("app title"))
        _ = toast.Push("test_message",
            toast.WithTitle("GO-WASM-APP"),
            toast.WithOnClick(func(event interface{}) {
                fmt.Println("click")
            }),
            toast.WithOnClose(func() {
                fmt.Println("close")
            }),
            toast.WithOnShow(func() {
                fmt.Println("show")
            }),
        )
    }
      
    

Thanks

Thank you JetBrains for providing free open source licenses


RepositoryDescription
go-toast/toastA go package for Windows 10 toast notifications
fyne-io/fyneCross platform GUI in Go inspired by Material Design
gen2brain/beeepGo cross-platform library for sending desktop notifications, alerts and beeps
julienXX/terminal-notifierSend User Notifications on macOS from the command-line.
variadico/notiMonitor a process and trigger a notification.

FAQs

Package last updated on 28 Sep 2024

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