compile

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package compile provides an utility function to compile files in preparation tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(t *testing.T, name string, o Options)

Compile compiles the file at the given path using the corgi compiler available under os.Args[1].

Types

type Options

type Options struct {
	// FileType overwrites the file type of the file to compile.
	FileType file.Type
	// OutName overwrites the name of the output file.
	OutName string
	// Format calls gofmt on the output file.
	Format bool

	// Package sets the name of the package in which the generated function
	// will be placed.
	//
	// If not set, the name of the directory in which the calling file is
	// located, will be used.
	Package string
}

Jump to

Keyboard shortcuts

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