genroot

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractYear added in v0.28.0

func ExtractYear(fname string) int

ExtractYear returns the copyright year of a Go-HEP header file.

func GenImports

func GenImports(year int, pkg string, w io.Writer, imports ...string)

GenImports adds the provided imports to the given writer.

func GenRFunc added in v0.28.0

func GenRFunc(w io.Writer, fct RFunc) error

GenRFunc generates the rtree/rfunc.Formula implementation for fct.

func GoFmt

func GoFmt(f *os.File)

GoFmt formats a file using gofmt.

func NewRFuncGenerator added in v0.28.0

func NewRFuncGenerator(w io.Writer, fct RFunc) (*rfuncGen, error)

Types

type RFunc added in v0.28.0

type RFunc struct {
	Pkg  string // Name of package hosting the formula to be generated.
	Path string // Import path of the package holding the function.
	Name string // Formula name.
	Def  string // Function name or signature.
}

RFunc describes which function should be used as a template to implement the rtree/rfunc.Formula interface.

Jump to

Keyboard shortcuts

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