archivetest

package
v2.48.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package archivetest provides useful functions for testing archives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTar

func NewTar(root map[string]any) ([]byte, error)

NewTar returns the bytes of a new tar archive containing root.

func NewZip

func NewZip(root map[string]any) ([]byte, error)

Types

type Dir

type Dir struct {
	Perm    fs.FileMode
	Entries map[string]any
}

A Dir represents a directory.

type File

type File struct {
	Perm     fs.FileMode
	Contents []byte
}

A File represents a file.

type Symlink struct {
	Target string
}

A Symlink represents a symlink.

Jump to

Keyboard shortcuts

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