fake

package
v0.0.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeAttrs

func MakeAttrs(attrs map[string]string) map[string]string

func NullDebugLogger

func NullDebugLogger(fmt string, args ...interface{})

Types

type Creator

type Creator interface {
	Create(Tree) error
}

type DebugLogger

type DebugLogger func(string, ...interface{})
var DebugLog DebugLogger = NullDebugLogger

type FakeSysfs

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

func NewFakeSysfs

func NewFakeSysfs(base string) (*FakeSysfs, error)

func (*FakeSysfs) AddTree

func (fs *FakeSysfs) AddTree(entries ...string) Tree

func (*FakeSysfs) Base

func (fs *FakeSysfs) Base() string

func (*FakeSysfs) Root

func (fs *FakeSysfs) Root() Tree

func (*FakeSysfs) Setup

func (fs *FakeSysfs) Setup() error

func (*FakeSysfs) Teardown

func (fs *FakeSysfs) Teardown() error

type Tree

type Tree interface {
	Add(name string, attrs map[string]string) Tree
	Name() string
	Items() []Tree
	SetAttrs() error
	Attrs() map[string]string
	Create() error
}

func NewTree

func NewTree(name string, attrs map[string]string) Tree

Jump to

Keyboard shortcuts

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