flag

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelpRequested

type HelpRequested struct {
	Message string // Message is the help message.
}

HelpRequested indicates that help was requested.

func (*HelpRequested) Error

func (e *HelpRequested) Error() string

Error returns the help message.

type Options

type Options struct {
	Debug           bool              // Set LogLevel to Debug
	DebugServerPort int               // Port for the debug server
	LogFormat       logging.LogFormat // Specify the log output format
	ConfigPath      string            // Path to the configuration file
	ListenAddr      string            // Address to listen on
	SiteRoot        string            // Root URL of the site
	HistorySize     int               // Size of the history ring buffer
	SkipTLS         bool              // Skip TLS for all receivers
	RetryCount      int               // Number of retries for notifications
	RetryDelay      time.Duration     // Delay between retries
}

Options holds the application configuration.

func ParseFlags

func ParseFlags(args []string, version string, getEnv func(string) string) (Options, error)

ParseFlags parses flags and environment variables.

func (*Options) Validate

func (c *Options) Validate() error

Validate checks whether the Options are valid.

Jump to

Keyboard shortcuts

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