internal

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StaticStorageDirectory = filepath.Join(mustGetHomeDir(), twDirName)
	TempStorageDirectory   = filepath.Join(os.TempDir(), twDirName)
)
View Source
var ErrArchiveFileNotFound = errors.New("archive file not found")
View Source
var ErrRequiredVersionNotFound = errors.New("required version not found")

Functions

func CreateOrTruncate

func CreateOrTruncate(path string) (*os.File, error)

func DownloadTo

func DownloadTo(ctx context.Context, url string, dest io.Writer) error

func HclRequiredVersion

func HclRequiredVersion(in io.Reader) (string, error)

HclRequiredVersion parse HCL looking for the expression `required_version = "~> 1.2.3"` to extract the semantic version.

func Unzip

func Unzip(archive string, file string, dest io.Writer) error

Unzip extracts a file from an archive and writes it to a destination.

Types

This section is empty.

Jump to

Keyboard shortcuts

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