lib

package
v0.0.0-...-bc4b841 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SEP_HEADER = `` /* 182-byte string literal not displayed */

	SEP_FUNCHEADER = `` /* 364-byte string literal not displayed */

	SEP_FUNCPROLOGUE = `
		var {param} {ptype}
		dec.Decode(&{param})

		/*
			End for each
		*/`

	SEP_FUNCCORE = `
		{fncall}

		/*
			For each return, encode the result
		*/`

	SEP_FUNCEPILOGUE_LOGERR = `
		if {param} != nil {
			LogError(ctx, {param})
		}`

	SEP_FUNCEPILOGUE = `

		enc.Encode({param})
		
		/*
			End for each
		*/`

	SEP_PFUNCEPILOGUE = `

		if {param} != nil {
			enc.Encode({param})
		} else {
			enc.Encode(false)
		}

		/*
			End for each
		*/`
	SEP_FUNCFOOTER = `
		_ = enc
		_ = dec
	})`

	SEP_FOOTER = `
}
`

	CEP_HEADER = `` /* 158-byte string literal not displayed */

	CEP_FUNCHEADER = `` /* 228-byte string literal not displayed */

	CEP_FUNCPROLOGUE = `
		enc.Encode({param})
`

	CEP_FUNCCORE = `` /* 253-byte string literal not displayed */

	CEP_FUNCEPILOGUE_LOGERR = `
	if dec == nil {
		{param} = errors.New("v8: failed to establish connection")
	}`

	CEP_FUNCEPILOGUE = `
	var {param} {ptype}
	if dec != nil {
		dec.Decode(&{param})
	}`

	CEP_FUNCFOOTER = `
	/*
		End for each
	*/
	_ = dec

	return {fnreturn}
}
`
	CEP_FOOTER = ``
)
View Source
const INDEX_HTML = `` /* 668-byte string literal not displayed */
View Source
const LOADER_GIF = `` /* 57374-byte string literal not displayed */

Variables

This section is empty.

Functions

func BuildCSS

func BuildCSS(src, dst string) error

src and dst must be an 'assets' dir

func BuildWASM

func BuildWASM(src, dst string, support bool) error

func CopyFile

func CopyFile(src, dst string) (int64, error)

func Hash

func Hash(text string) string

func IsDir

func IsDir(src string) bool

func IsFile

func IsFile(src string) bool

func ListDir

func ListDir(src string) []string

func NewCommand

func NewCommand(args []string, cwd string, environ []string) *exec.Cmd

func NewWASMServer

func NewWASMServer() (http.Handler, error)

func RemovePrefixes

func RemovePrefixes(prefix string) string

func Replace2

func Replace2(s, olda, newa, oldb, newb string) string

func StringInSlice

func StringInSlice(a string, list []string) bool

func Subfolders

func Subfolders(path string) (paths []string)

Subfolders returns a slice of subfolders (recursive), including the folder provided.

func WriteIndex

func WriteIndex(w io.Writer) error

Types

type Directories

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

func GetDirectories

func GetDirectories() (*Directories, error)

func (*Directories) Client

func (d *Directories) Client() string

func (*Directories) IsLocal

func (d *Directories) IsLocal() bool

func (*Directories) Server

func (d *Directories) Server() string

type File

type File struct {
	Functions []Function
	// contains filtered or unexported fields
}

func (*File) Imports

func (lf *File) Imports() []string

Get a list of the imports in the file

func (*File) Load

func (lf *File) Load(fname string) error

type FileWatcher

type FileWatcher interface {
	WatchFor(typ WatchType, callback func(string))
}

func NewRecursiveWatcher

func NewRecursiveWatcher(path string) (FileWatcher, error)

func NewWatcher

func NewWatcher(path string) (FileWatcher, error)

type Function

type Function struct {
	Name       string
	Parameters []Type
	Returns    []Type
}

type Stylesheet

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

func (*Stylesheet) AddFile

func (ss *Stylesheet) AddFile(reader io.Reader)

type Type

type Type struct {
	Prefix    string
	Name      string
	Rendering string
}

func GetTypes

func GetTypes(fieldlist *ast.FieldList, fset *token.FileSet) []Type

Create a list of type pairs from a field list

type WatchType

type WatchType int
const (
	Files WatchType = iota
	Folders
	FilesAndFolders
)

type Watcher

type Watcher struct {
	*fsnotify.Watcher
	// contains filtered or unexported fields
}

func (*Watcher) AddFolder

func (watcher *Watcher) AddFolder(folder string)

func (*Watcher) Channels

func (watcher *Watcher) Channels() (chan string, chan string, chan error)

func (*Watcher) Run

func (watcher *Watcher) Run()

func (*Watcher) WatchFor

func (watcher *Watcher) WatchFor(typ WatchType, callback func(string))

Jump to

Keyboard shortcuts

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