config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package config saves and fetches settings used by the df2 tool.

Index

Constants

This section is empty.

Variables

View Source
var Config = Settings{
	Name:   filename,
	Errors: false,
	// contains filtered or unexported fields
}

Config settings.

View Source
var ErrNoEditor = errors.New(`no suitable editor could be found
please set one by creating a $EDITOR environment variable in your shell configuration`)

ErrNoEditor no editor error.

View Source
var ErrSaveType = errors.New("unsupported value interface type")
View Source
var ErrSetName = errors.New("invalid flag name")

Functions

func Check

func Check()

Check prints a notice for the missing configuration file.

func Create

func Create(ow bool) error

Create a configuration file.

func Delete

func Delete() error

Delete a configuration file.

func Edit

func Edit()

Edit a configuration file.

func Filepath

func Filepath() string

Filepath is the absolute path and filename of the configuration file.

func Info

func Info(sizes bool) error

Info prints the content of a configuration file.

func Set

func Set(name string) error

Set edits and saves a setting within a configuration file.

Types

type Settings

type Settings struct {
	Name   string // config filename
	Errors bool   // flag a config file error, used by root.go initConfig()
	// contains filtered or unexported fields
}

Settings for the configuration.

Jump to

Keyboard shortcuts

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