cgowrap

package
v0.0.0-...-d94b2d5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound        = errors.New("not found")
	ErrMismatchModTime = errors.New("modTime mismatch")
)

Functions

func WorkDir

func WorkDir(tail ...string) string

WorkDir returns a working directory for cgowrap.

func WorkFile

func WorkFile(tail ...string) string

WorkFile returns a working file for cgowrap.

Types

type Cache

type Cache struct {
	Depfile    *DepfileCache
	GuessKinds *GuessKindsCache
	// contains filtered or unexported fields
}

func OpenCache

func OpenCache() (*Cache, error)

type DepfileCache

type DepfileCache Cache

func (*DepfileCache) Path

func (c *DepfileCache) Path(id string) string

func (*DepfileCache) Save

func (c *DepfileCache) Save(id string) error

func (*DepfileCache) Validate

func (c *DepfileCache) Validate(id string) error

IsValid returns true if the depfile cache is still valid.

type GuessKindsCache

type GuessKindsCache Cache

func (*GuessKindsCache) Load

func (c *GuessKindsCache) Load(k string) (Output, bool)

func (*GuessKindsCache) Save

func (c *GuessKindsCache) Save(k string, out Output) error

type Output

type Output struct {
	Stdout []byte `json:"-"`
	Stderr []byte `json:"-"`
	Status int    `json:"status"`
}

func (Output) IsEmpty

func (o Output) IsEmpty() bool

func (Output) Print

func (o Output) Print()

Print prints the output.

Jump to

Keyboard shortcuts

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