sendslackmessage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SendSlackMessageCmd = &cobra.Command{
	Use:   "send-slack-message",
	Short: "This command will send message to any slack channel.",
	PreRunE: func(cmd *cobra.Command, args []string) error {
		requiredEnvVars := []string{"slack_token", "channel_id"}
		for _, e := range requiredEnvVars {
			if viper.GetString(e) == "" {
				return fmt.Errorf("%+v env var not set", strings.ToUpper(e))
			}
		}
		return nil
	},
	Run: run,
}

SendSlackMessageCmd defines to send messages to a Slack channel.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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