scriptfile

package
v0.0.0-...-b6fc690 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScriptFile

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

ScriptFile represents an on-disk executable file.

func New

func New(l language.Language, name, script string) (*ScriptFile, error)

New receives a language and script body that are used to construct a runable on-disk file that is tracked by the returned value.

func NewAsSource

func NewAsSource(l language.Language, name, script string) (*ScriptFile, error)

NewAsSource recieves a language and script body that are used to construct an on-disk file that is tracked by the return value. This file is not guaranteed to be runnable

func NewEmpty

func NewEmpty(l language.Language, name string) (*ScriptFile, error)

NewEmpty receives a language that is used to construct a runnable, but empty, on-disk file that is tracked by the return value.

func (*ScriptFile) Clean

func (sf *ScriptFile) Clean()

Clean provides simple/deferable clean up.

func (*ScriptFile) Filename

func (sf *ScriptFile) Filename() string

Filename returns the on-disk filename of the tracked script file.

func (*ScriptFile) Write

func (sf *ScriptFile) Write(value string) error

Write updates the on-disk scriptfile with the script value

Jump to

Keyboard shortcuts

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