From 6ff28396bd501cdd3af2c6b9a8dfdb4e60618e4f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 4 Jul 2026 21:34:30 +0300 Subject: support files and templates --- Magefile.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Magefile.go') diff --git a/Magefile.go b/Magefile.go index b4ec4e7..44cfeee 100644 --- a/Magefile.go +++ b/Magefile.go @@ -21,12 +21,27 @@ func run(cmd string, args ...string) error { return c.Run() } +// Default runs the program. +func Default() error { + return Run() +} + // Build compiles the binary. func Build() error { fmt.Println("building...") return run("go", "build", "-o", binName, "./cmd/gonf") } + +// Run builds and runs the program. +func Run() error { + fmt.Println("running...") + if err := Build(); err != nil { + return err + } + return run("./"+binName, "version") +} + // Test runs all unit tests. func Test() error { fmt.Println("testing...") -- cgit v1.2.3