configuration

package
v0.0.0-...-1391122 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAME    string = "xsubfind3r"
	VERSION string = "0.7.0"
)

Variables

View Source
var (
		aurora.BrightBlue(`
                _      __ _           _ _____      
__  _____ _   _| |__  / _(_)_ __   __| |___ / _ __ 
\ \/ / __| | | | '_ \| |_| | '_ \ / _`+"`"+` | |_ \| '__|
 >  <\__ \ |_| | |_) |  _| | | | | (_| |___) | |   
/_/\_\___/\__,_|_.__/|_| |_|_| |_|\__,_|____/|_| 
                                             %s

                   %s`).Bold(),
		aurora.BrightRed("v"+VERSION).Bold(),
		aurora.BrightYellow("with <3 by Hueristiq Open Source").Italic(),
	)
	UserDotConfigDirectoryPath = func() (userDotConfig string) {
		var err error

		userDotConfig, err = os.UserConfigDir()
		if err != nil {
			hqgolog.Fatal().Msg(err.Error())
		}

		return
	}()

	ProjectRootDirectoryPath = filepath.Join(UserDotConfigDirectoryPath, projectRootDirectoryName)

	ConfigurationFilePath = filepath.Join(ProjectRootDirectoryPath, configurationFileName)
)

Functions

func CreateUpdate

func CreateUpdate(path string) (err error)

Types

type Configuration

type Configuration struct {
	Version string       `yaml:"version"`
	Sources []string     `yaml:"sources"`
	Keys    sources.Keys `yaml:"keys"`
}

func Read

func Read(path string) (cfg Configuration, err error)

func (*Configuration) Write

func (cfg *Configuration) Write(path string) (err error)

Jump to

Keyboard shortcuts

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