commonflags

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package commonflags provides shared unprefixed flags for input plugins. These flags are common across multiple input plugins and use no prefix.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Count is the number of colors to extract.
	Count int

	// AspectRatio is the image aspect ratio.
	AspectRatio string

	// Cache flags
	CacheEnabled   bool
	CacheDir       string
	CacheFilename  string
	CacheOverwrite bool

	// Region extraction flags
	ExtractAmbience bool
	Regions         int
	SamplePercent   int
	SampleMethod    string

	// Seed flags
	SeedMode  string
	SeedValue int64
)

Shared common flag variables.

Functions

func GetDefaultCacheDir

func GetDefaultCacheDir() string

GetDefaultCacheDir returns the default cache directory.

func RegisterFlags

func RegisterFlags(cmd *cobra.Command)

RegisterFlags registers the shared common flags on the given command. This should be called by plugins that need these flags. It checks if flags already exist to avoid duplicate registration.

func Reset

func Reset()

Reset resets all flag values to defaults. Useful for testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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