sheets

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: 9 Imported by: 0

Documentation

Overview

Package sheets implements functions pertaining to loading, sorting, filtering, and tagging cheatsheets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consolidate

func Consolidate(
	cheatpaths []map[string]sheet.Sheet,
) map[string]sheet.Sheet

Consolidate applies cheatsheet "overrides", resolving title conflicts that exist among cheatpaths by preferring more local cheatsheets over less local cheatsheets.

func Filter

func Filter(
	cheatpaths []map[string]sheet.Sheet,
	tags []string,
) []map[string]sheet.Sheet

Filter filters cheatsheets that do not match `tag(s)`

func Load

func Load(cheatpaths []cp.Cheatpath) ([]map[string]sheet.Sheet, error)

Load produces a map of cheatsheet titles to filesystem paths

func Sort

func Sort(cheatsheets map[string]sheet.Sheet) []sheet.Sheet

Sort organizes the cheatsheets into an alphabetically-sorted slice

func Tags

func Tags(cheatpaths []map[string]sheet.Sheet) []string

Tags returns a slice of all tags in use in any sheet

Types

This section is empty.

Jump to

Keyboard shortcuts

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