config

package
v1.1.20 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 18 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.
	Config = settings{
		Name:   filename,
		Errors: false,
		// contains filtered or unexported fields
	}
)
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")

ErrSaveType bad value type.

Functions

func Check

func Check()

Check prints a missing configuration file notice.

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() (dir string)

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

func Info

func Info() 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

This section is empty.

Jump to

Keyboard shortcuts

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