cache

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

🌳 Go Bonzai™ Cached Variables

GoDoc License

Install

This command can be installed as a standalone program or composed into a Bonzai command tree.

Standalone

go install github.com/rwxrob/cache/cache@latest
alias var=cache

Composed

package z

import (
	Z "github.com/rwxrob/bonzai/z"
	"github.com/rwxrob/cache"
)

var Cmd = &Z.Cmd{
	Name:     `z`,
	Commands: []*Z.Cmd{help.Cmd, cache.Cmd},
}

Tab Completion

To activate bash completion just use the complete -C option from your .bashrc or command line. There is no messy sourcing required. All the completion is done by the program itself.

complete -C cache cache

If you don't have bash or tab completion check use the shortcut commands instead.

Embedded Documentation

All documentation (like manual pages) has been embedded into the source code of the application. See the source or run the program with help to access it.

Documentation

Overview

Package cache provides the Bonzai command branch of the same name.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &Z.Cmd{

	Name:      `var`,
	Summary:   `cache variables in {{ execachedir "vars"}}`,
	Version:   `v0.1.1`,
	Copyright: `Copyright 2021 Robert S Muhlestein`,
	License:   `Apache-2.0`,
	Commands:  []*Z.Cmd{help.Cmd, _init, set, get, _file, data, edit},

	Description: `
		The *{{.Name}}* command provides a cross-platform, persistent
		alternative to environment/system variables. The subcommands are
		designed to be safe and convenient.

		Implementation

		Variables are cached as key=val (property) pairs, one to a line, in
		the {{ execachedir "vars" }} file.

		Key names are automatically prefixed with the Cmd.Path ('{{ .Path
		}}' in this case) which changed depending on where this cache (var)
		branch is composed into the Bonzai command tree.

		Keys must not include an equal sign (=) which is the only line
		delimiter.

		Carriage returns (\r) and line returns (\n) are escaped
		and each line is terminated with a line return (\n).`}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package cache provides high-level functions that are called from the Go Bonzai branch of the same name providing universal access to the core functionality.
Package cache provides high-level functions that are called from the Go Bonzai branch of the same name providing universal access to the core functionality.

Jump to

Keyboard shortcuts

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