config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: AGPL-3.0-or-later

Index

Constants

View Source
const (
	EnvPrefix         = "SHARKFIN"
	ConfigFileName    = "config"
	ConfigType        = "yaml"
	DefaultDaemonAddr = "127.0.0.1:16000"
)

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(flags *pflag.FlagSet) error

BindFlags binds cobra flags to viper.

func InitDirs

func InitDirs() error

InitDirs creates all necessary directories.

func InitViper

func InitViper()

InitViper sets up viper defaults and config file search paths.

func LoadConfig

func LoadConfig() error

LoadConfig reads the config file if present.

Types

type Paths

type Paths struct {
	ConfigDir string
	StateDir  string
}

Paths holds all XDG-compliant directory paths.

var GlobalPaths *Paths

func GetPaths

func GetPaths() *Paths

GetPaths returns XDG-compliant directory paths.

Jump to

Keyboard shortcuts

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