package genroot
import "go-hep.org/x/hep/groot/internal/genroot"
Index ¶
- func ExtractYear(fname string) int
- func GenImports(year int, pkg string, w io.Writer, imports ...string)
- func GenRFunc(w io.Writer, fct RFunc) error
- func GoFmt(f *os.File)
- func NewRFuncGenerator(w io.Writer, fct RFunc) (*rfuncGen, error)
- type RFunc
Functions ¶
func ExtractYear ¶
ExtractYear returns the copyright year of a Go-HEP header file.
func GenImports ¶
GenImports adds the provided imports to the given writer.
func GenRFunc ¶
GenRFunc generates the rtree/rfunc.Formula implementation for fct.
func GoFmt ¶
GoFmt formats a file using gofmt.
func NewRFuncGenerator ¶
Types ¶
type RFunc ¶
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.
Source Files ¶
genrfunc.go genroot.go
- Version
- v0.36.0 (latest)
- Published
- Nov 15, 2024
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 2 days ago –
Tools for package owners.