osstub

package
v1.15.18 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("osstub",
	fx.Supply(fx.Annotate(&osStub{}, fx.As(new(OsStub)))),
)
View Source
var TestModule = fx.Module("osstub-test",
	fx.Supply(fx.Annotate(&TestStub{
		Env: make(map[string]string),
	}, fx.As(new(OsStub)))),
)

Functions

This section is empty.

Types

type OsStub

type OsStub interface {
	Exit(code int)
	Getenv(key string) string
	Println(a ...interface{})
}

type TestStub

type TestStub struct {
	Env      map[string]string
	Prints   []string
	ExitCode *int
}

func (*TestStub) Exit

func (t *TestStub) Exit(code int)

func (*TestStub) Getenv

func (t *TestStub) Getenv(key string) string

func (*TestStub) Println

func (t *TestStub) Println(a ...interface{})

Jump to

Keyboard shortcuts

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