command

package module
v0.0.0-...-3f22163 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 6 Imported by: 1

README

command

Execute an external command.

Example:

  1. Append stdin content to a file:
tee -a {{printf "%s.txt" .AppName | printf "%q"}}
  1. Create a macOS notification using terminal-notifier:
terminal-notifier -title {{printf "%q" .Message}} -message {{printf "%s (%s)" .AppName .Environment | printf "%q"}} -open {{printf "%q" .Url}}

Currently, you can use these variables:

{{.Id}}
{{.AppId}}
{{.AppName}}
{{.Message}}
{{.ErrorClass}}
{{.Environment}}
{{.Location}}
{{.Url}}
{{.NoticesCount}}
{{.LastNoticeId}}
{{.LastNoticeAt}}
{{.FirstNoticeAt}}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name        = "command"
	Description = `Execute an external command. [README](https://github.com/caiguanhao/goerrbit/tree/master/plugins/command)`
)

Functions

func New

func New() interface{}

Types

type Command

type Command struct {
	Command string `validate:"required" label:"Command" placeholder:"Command to execute"`
}

func (Command) CreateNotification

func (command Command) CreateNotification(problem map[string]string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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