runmode

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecRunMode

func ExecRunMode(config Config) error

ExecRunMode handles the "outrig run" command with AST rewriting

func FindMainFile

func FindMainFile(goFiles []string) (string, error)

FindMainFile searches through the provided Go files and returns the one containing the main() function Returns an error if no main() function is found or if multiple main() functions are found

func RewriteAndCreateTempFile

func RewriteAndCreateTempFile(sourceFile string, tempDir string) (string, error)

RewriteAndCreateTempFile parses the given Go file, injects outrig.Init() into main(), and creates a temporary file with the modified code in the provided temp directory. Returns the path to the temporary file.

Types

type Config

type Config struct {
	Args      []string
	IsDev     bool
	IsVerbose bool
}

Config holds configuration for ExecRunMode

Jump to

Keyboard shortcuts

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