configuration

package
v0.0.0-...-365dbec Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAME    string = "xurlfind3r"
	VERSION string = "0.4.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) (configuration Configuration, err error)

func (*Configuration) Write

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

Jump to

Keyboard shortcuts

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