tar

package
v1.0.39 Latest Latest
Warning

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

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

README

Tar

Purpose of the tar package is to enable components to process a set of files from StdIn and StdOut, so they can be pure

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// the empty file list
	Empty = RR.Empty[string, []byte]()
	// LookupBytes accesses a file as bytes from a file list
	LookupBytes = F.Flow2(
		cleanPath,
		RR.Lookup[[]byte, string],
	)
	// the monoid used to merge FileList objects
	Monoid = RR.UnionMonoid[string](SG.Last[[]byte]())
)

Functions

func CreateEntry

func CreateEntry(path string) func([]byte) FileEntry

CreateEntry constructs a file entry with byte content

func LookupString

func LookupString(path string) func(FileList) O.Option[string]

LookupString accesses a file as string from a file list

func Singleton

func Singleton(path string) func([]byte) FileList

Singleton returns a file list with one single entry

func UpsertBytes

func UpsertBytes(path string) func([]byte) func(FileList) FileList

UpsertBytes adds a file by path to a file list

func UpsertString

func UpsertString(path string) func(string) func(FileList) FileList

UpsertString adds a file by path to a file list

Types

type FileEntry

type FileEntry = T.Tuple2[string, []byte]

one entry in the file list

type FileList

type FileList = map[string][]byte

FileList represents a mapping from filepath to the byte value of a file

func FromEntries

func FromEntries(entries []FileEntry) FileList

FromEntries creates a file list from a set of entries

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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