wsl

package
v0.11.2-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Distro

type Distro struct{}

func DefaultDistro

func DefaultDistro(ctx context.Context) (d Distro, ok bool, err error)

func GetDistro

func GetDistro(ctx context.Context, wslDistroName WslName) (*Distro, error)

func RegisteredDistros

func RegisteredDistros(ctx context.Context) (distros []Distro, err error)

func (*Distro) Name

func (d *Distro) Name() string

func (*Distro) WslCommand

func (d *Distro) WslCommand(ctx context.Context, cmd string) *WslCmd

type WslCmd

type WslCmd struct {
	exec.Cmd
}

just use the regular cmd since it's similar enough to not cause issues type WslCmd = exec.Cmd

func GetDistroCmd

func GetDistroCmd(ctx context.Context, wslDistroName string, cmd string) (*WslCmd, error)

func (*WslCmd) ExitCode added in v0.10.0

func (wc *WslCmd) ExitCode() int

func (*WslCmd) GetProcess

func (wc *WslCmd) GetProcess() *os.Process

func (*WslCmd) GetProcessState

func (wc *WslCmd) GetProcessState() *os.ProcessState

func (*WslCmd) SetStderr

func (c *WslCmd) SetStderr(stderr io.Writer)

func (*WslCmd) SetStdin

func (c *WslCmd) SetStdin(stdin io.Reader)

func (*WslCmd) SetStdout

func (c *WslCmd) SetStdout(stdout io.Writer)

type WslName

type WslName struct {
	Distro string `json:"distro"`
}

Jump to

Keyboard shortcuts

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