cache

package
v0.0.0-...-2083588 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create()

Create local cache assets

func Find

func Find(name string, lang string, plat platform.Platform, get bool) (*os.File, string, platform.Platform)

Find attempts to find the requested tldr page from the local cache. If a local cache page is not found it will attempt to retrieve the page from tldr pages repository

func Remove

func Remove(name string, lang string, plat platform.Platform, exit bool)

Remove will delete a local tldr page from the cache or if `clearall` is provided as the name it will remove all tldr pages from the cache.

Types

type Pages

type Pages struct {
	Name     string
	Lang     string
	Platform platform.Platform
	// contains filtered or unexported fields
}

Pages provides the retrieval of the TLDR assets and repository pages.

func NewPage

func NewPage(name string, lang string, plat platform.Platform) *Pages

NewPage creates a new Pages instance

func (*Pages) Body

func (p *Pages) Body() io.ReadCloser

Body returns the result of a http lookup from the main TLDR repository for a TLDR page that was not found in the local cache.

func (*Pages) Zip

func (p *Pages) Zip() io.ReadCloser

Zip returns the result of the downloaded TLDR pages zip file.

Jump to

Keyboard shortcuts

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