config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config provides hierarchical configuration management for spgtty. It uses Viper to load configuration from multiple sources in this order (later sources override earlier ones):

  1. Defaults (hardcoded)
  2. Global config: ~/.config/spgtty/config.yaml
  3. Local config: .spgtty.yaml in current directory
  4. Environment variables: SPGTTY_*
  5. CLI flags (bound via BindPFlag)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFileUsed

func ConfigFileUsed() string

ConfigFileUsed returns the config file path if one was loaded.

func GetBuildEntry

func GetBuildEntry() string

GetBuildEntry returns the entry file path.

func GetBuildMinify

func GetBuildMinify() bool

GetBuildMinify returns whether minification is enabled.

func GetBuildOutput

func GetBuildOutput() string

GetBuildOutput returns the output file path.

func GetShellyHost

func GetShellyHost() string

GetShellyHost returns the configured Shelly device host.

func GetShellyScriptID

func GetShellyScriptID() int

GetShellyScriptID returns the configured script slot ID.

func Init

func Init()

Init initializes the Viper configuration. Call this in cobra.OnInitialize() in cmd/root.go.

Types

This section is empty.

Jump to

Keyboard shortcuts

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