Skip to content

Commit

Permalink
bump warg
Browse files Browse the repository at this point in the history
  • Loading branch information
bbkane committed Mar 20, 2022
1 parent a8eefaa commit d5cd2e9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ go 1.17
require (
github.com/karrick/godirwalk v1.16.1
go.bbkane.com/gocolor v0.0.4
go.bbkane.com/warg v0.0.12
go.bbkane.com/warg v0.0.13
)

require (
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ go.bbkane.com/gocolor v0.0.4 h1:UI4ejgjHdC6oupH8src8+FQgbbfcZ6C7BSPZzecBjzs=
go.bbkane.com/gocolor v0.0.4/go.mod h1:7AEOm8kyPlpj9qr/SL9mEXSceh8xM2w+eBm4deMRNHk=
go.bbkane.com/warg v0.0.12 h1:+Jwf70ey/dlPCDmEREJSd045p1eGTX7r482bT2v3Cwc=
go.bbkane.com/warg v0.0.12/go.mod h1:kfv+iD8YFvnpqv9bUR2zp1PYTHHJWesIikcRcuJTgIc=
go.bbkane.com/warg v0.0.13 h1:BlnLM/gvELYqMpgAlAZCHLDJXKq1/uXKx1tLa+NtqXA=
go.bbkane.com/warg v0.0.13/go.mod h1:kfv+iD8YFvnpqv9bUR2zp1PYTHHJWesIikcRcuJTgIc=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c=
Expand Down
9 changes: 6 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"go.bbkane.com/warg/value"
)

func main() {
func app() *warg.App {
linkUnlinkFlags := flag.FlagMap{
"--ask": flag.New(
"Whether to ask before making changes",
Expand Down Expand Up @@ -45,7 +45,6 @@ func main() {
}

app := warg.New(
"fling",
section.New(
"Link and unlink directory heirarchies ",
section.Command(
Expand Down Expand Up @@ -74,5 +73,9 @@ func main() {
),
),
)
app.MustRun(os.Args, os.LookupEnv)
return &app
}

func main() {
app().MustRun(os.Args, os.LookupEnv)
}
11 changes: 11 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package main

import (
"testing"
)

func TestBuildApp(t *testing.T) {
if err := app().Validate(); err != nil {
t.Fatal(err)
}
}

0 comments on commit d5cd2e9

Please sign in to comment.