Skip to content
/ notifile Public

An little library to create notification files with golang.

License

Notifications You must be signed in to change notification settings

echgo/notifile

Repository files navigation


notifile

GitHub go.mod Go version of a Go module Go CodeQL CompVer Go Doc Go Report Card GitHub issues GitHub forks GitHub stars GitHub license

With this library you can easily create notification files for your Go projects. These must then be stored in the directory you specify so that echGo can read them.

Install

go get github.com/echgo/notifile

How to use?

You can use the following example to create a file. Please note that there are currently only the following notification channels: gotify, pushover, matrix, telegram, discord, slack, trello, zendesk, osticket, twillo, smtp & webhook.

data := notifile.Data{
    Channels:  []string{"gotify", "telegram"},
    Headline: "New notification!",
    Message:  "Here you will find your message.",
}

err := notifile.Create(data, filepath.Join("var", "lib", "echgo", "notification")
if err != nil {
    log.Fatalln(err)
}

Special thanks

Thanks to JetBrains for supporting me with this and other open source projects.