diff options
| author | Paul Buetow <paul@buetow.org> | 2026-07-04 21:34:30 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-07-04 21:34:30 +0300 |
| commit | 6ff28396bd501cdd3af2c6b9a8dfdb4e60618e4f (patch) | |
| tree | 77801f9a29be1d7b4ff2b8283e56a2f4976c302d /Magefile.go | |
| parent | 31c7a348184872a05bb5c130c09b91c44fc0e52d (diff) | |
support files and templates
Diffstat (limited to 'Magefile.go')
| -rw-r--r-- | Magefile.go | 15 |
1 files changed, 15 insertions, 0 deletions
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...") |
