import "github.com/egdaemon/eg/runtime/x/wasi/egbug"
Package egbug is an internal package and not under the compatiability promises of EG. its used for debugging and analysis.
const (
EnvUnsafeDigest = "EG_UNSAFE_ENVVARS_DIGEST"
)
const (
ErrUnexpectedSuccessfulOperation = errorsx.String("expected an error but operation succeeded")
)
func APTPackage(packages ...string) eg.OpFn
prints information about the provided apt packages using dpkg and apt.
func CachedID() string
func DebugFailure(op, debug eg.OpFn) eg.OpFn
Utility operation for debugging failures
func Depth() int
func DirectoryTree(dir string) eg.OpFn
prints the directory tree of the provided path.
func EgEnviron() []string
func EnsureEnv(expected string, keys ...string) eg.OpFn
func EnsureEnvAuto(ctx context.Context, op eg.Op) error
Ensures the environment is stable between releases. only usable for standard compute. baremetal is too variable. use EnsureEnvSubset for baremetal.
func Env(ctx context.Context, op eg.Op) error
prints current environment variables.
func ExpectedFailure(op eg.OpFn, allowed ...error) eg.OpFn
for commands we want to fail in a particular manner. useful for tests.
func Fail(ctx context.Context, op eg.Op) error
func FileTree(ctx context.Context, op eg.Op) error
prints debugging information about the environment workspaces.
func Images(ctx context.Context, op eg.Op) error
func Log(m ...any) eg.OpFn
func Module(ctx context.Context, op eg.Op) error
prints debugging information about the currently executing module.
func Must[T any](v T, err error) T
func Sleep(d time.Duration) eg.OpFn
utility function for prototyping.
func SystemInit(ctx context.Context, op eg.Op) error
debugging information for system initialization
func Users(ctx context.Context, op eg.Op) error
prints debugging information about the current user.
func Zero[T any](v T, err error) T