wsl

package
v0.11.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

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