internal

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStdlibExists    = errors.New("Stdlib already exists")
	ErrStdlibNotExists = errors.New("Stdlib does not exist")
)

Functions

func Unzip added in v1.2.1

func Unzip(src, dest string) error

Types

type Stdlib

type Stdlib struct {
	// contains filtered or unexported fields
}

func NewStdlib

func NewStdlib(efs embed.FS) *Stdlib

NewStdlib creates a new Stdlib instance with the given embedded filesystem.

func (*Stdlib) Read

func (sl *Stdlib) Read(p string) error

Read attempts to open and read the stdlib directory at the given path. It returns ErrStdlibNotExists if the path does not exist, ErrStdlibExists if the path already contains a stdlib, or another error.

func (*Stdlib) Write

func (sl *Stdlib) Write(p string) error

Write the embedded filesystem to the target directory for use by tools. It walks the filesystem, creates any necessary directories, writes each file to the corresponding path in the output directory.

Directories

Path Synopsis
Logger wrapper around the log/slog package to enable changing the log level dynamically.
Logger wrapper around the log/slog package to enable changing the log level dynamically.

Jump to

Keyboard shortcuts

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