file

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompiledExec

type CompiledExec struct {
	Language string
	Exec     []File
}

CompiledExec defines compiled executable

type File

type File interface {
	Opener
	ReaderOpener
	Content() ([]byte, error)
	Name() string
}

File defines file name with its content file could on file system or memory

func NewLocalFile

func NewLocalFile(name, path string) File

NewLocalFile creates a wrapper to file system by path

func NewMemFile

func NewMemFile(name string, content []byte) File

NewMemFile create a file interface from content and content should not be modified afterwards

type Opener

type Opener interface {
	Open() (*os.File, error)
}

Opener opens the file in readonly mode caller should close afterwards

type ReaderOpener added in v0.6.2

type ReaderOpener interface {
	Reader() (io.ReadCloser, error)
}

ReaderOpener creates readCloser for caller

type SourceCode

type SourceCode struct {
	Language   string
	Code       File
	ExtraFiles []File
}

SourceCode defines source code with its language

Jump to

Keyboard shortcuts

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