testutil

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(filename, dst string) error

Extract extracts the provided archive to the provided destination. It autodetects if it is a zip or a tar archive.

func FillBytes

func FillBytes(prefix string, n int) []byte

FillBytes returns a byte slice with a length of n, containing the prefix and remaining bytes filled with underscores.

func FillBytesZero

func FillBytesZero(prefix string, n int) []byte

FillBytesZero returns a byte slice of length n containing only the prefix.

func FreePort

func FreePort() string

FreePort finds a port that is currently free. TODO: remove use of freeport library.

func MakeSharedKeystones

func MakeSharedKeystones(n int) (map[chainhash.Hash]*hemi.L2KeystoneAbrev, []hemi.L2Keystone)

MakeSharedKeystones creates a matching map and slice of N keystones.

func SHA256

func SHA256(x []byte) []byte

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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