discover

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RunFile = ".run"

	BashArgs = "$*"

	CExtension          = ".c"
	CPPExtension        = ".cpp"
	RustExtension       = ".rs"
	PythonExtension     = ".py"
	JavaScriptExtension = ".js"
	GoExtension         = ".go"
	BashExtension       = ".sh"
	FishExtension       = ".fish"
	MakeExtension       = ".mk"
	Makefile            = "Makefile"
	Dockerfile          = "Dockerfile"
)

Variables

View Source
var (
	CMainDecl      = regexp.MustCompile(`(?m)(void|int)\s+main`)
	GoMainDecl     = regexp.MustCompile(`func\s+main`)
	PythonMainDecl = regexp.MustCompile(`if\s+__name__\s*==\s*["']__main__["']`)
	RustMainDecl   = regexp.MustCompile(`fn\s+main`)
)
View Source
var (
	ErrCommandNotFound = errors.New("command not found")
)

Functions

func ChooseBuildCommand added in v0.4.0

func ChooseBuildCommand(name string, cfg config.Config) ([]string, error)

func ChooseExecutable

func ChooseExecutable(cfg config.Config) error

Types

type Extension

type Extension = string

type Filename

type Filename = string

Jump to

Keyboard shortcuts

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