sender

package
v0.19.770 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

README

template-go-library

This is a template for creating a new go library.

Usage

When you create a new repository in infra-github set the template field to template-go-library:

module "my-go-library" {
  source = "./modules/repository"

  name          = "my-go-library"
  description   = "Go library"
  topics        = ["go-lib", ]
  from_template = "template-go-library"
}

Once you have created your repository, be sure to make an initial release and tag, named v0.0.1. This is required because each release of a library will look up the previous tag and use it to create the next tag.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNoopSender

func NewNoopSender() *noopNotifier

NewNoopSender instantiates a sender that does nothing

func NewSlackSender

func NewSlackSender(maybeURL string, opts ...Option) (*slackNotifier, error)

NewSlackSender instantiates a new sender that sends to Slack using maybeURL

func TemplateMessage

func TemplateMessage(msg string, vars map[string]string) (string, error)

Types

type NotificationSender

type NotificationSender interface {
	Send(context.Context, string) error
}

type Option

type Option func(*slackNotifier)

func WithChannel

func WithChannel(channel string) Option

func WithIconEmoji

func WithIconEmoji(iconEmoji string) Option

Jump to

Keyboard shortcuts

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