cheatpath

package
v0.0.0-...-7908a67 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package cheatpath implements functions pertaining to cheatsheet file path management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cheatpath

type Cheatpath struct {
	Name     string   `yaml:"name"`
	Path     string   `yaml:"path"`
	ReadOnly bool     `yaml:"readonly"`
	Tags     []string `yaml:"tags"`
}

Cheatpath encapsulates cheatsheet path information

func Filter

func Filter(paths []Cheatpath, name string) ([]Cheatpath, error)

Filter filters all cheatpaths that are not named `name`

func Writeable

func Writeable(cheatpaths []Cheatpath) (Cheatpath, error)

Writeable returns a writeable Cheatpath

func (*Cheatpath) Validate

func (c *Cheatpath) Validate() error

Validate returns an error if the cheatpath is invalid

Jump to

Keyboard shortcuts

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