Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxrob committed Apr 24, 2022
1 parent 95b205f commit 92ee6c6
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 30,7 @@ import (

var Cmd = &Z.Cmd{
Name: `z`,
Commands: []*Z.Cmd{help.Cmd, example.Cmd, example.Baz},
Commands: []*Z.Cmd{help.Cmd, example.Cmd, example.BazCmd},
}
```

Expand Down
2 changes: 1 addition & 1 deletion baz.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 10,7 @@ import (
)

// exported leaf
var Baz = &Z.Cmd{
var BazCmd = &Z.Cmd{
Name: `baz`,
Call: func(caller *Z.Cmd, none ...string) error {
log.Print("Baz, suncreen song")
Expand Down
24 changes: 18 additions & 6 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 15,25 @@ import (
"github.com/rwxrob/vars"
)

// Most Cmds that make use of the conf and vars branches will want to
// call SoftInit in order to create the persistence layers or whatever
// else is needed to initialize their use. This cannot be done
// automatically from these imported modules because Cmd authors may
// with to change the default values before calling SoftInit and
// committing them.

func init() {
Z.Conf.SoftInit()
Z.Vars.SoftInit()
}

// Cmd provides a Bonzai branch command that can be composed into Bonzai
// trees or used as a standalone with light wrapper (see cmd/).
var Cmd = &Z.Cmd{

Name: `example`,
Summary: `an example of Bonzai composite command tree`,
Version: `v0.3.2`,
Version: `v0.4.0`,
Copyright: `Copyright 2021 Robert S Muhlestein`,
License: `Apache-2.0`,
Site: `rwxrob.tv`,
Expand All @@ -38,7 50,7 @@ var Cmd = &Z.Cmd{
help.Cmd, conf.Cmd, vars.Cmd,

// local commands (in this module)
Bar, own, pkgexample, Baz,
BarCmd, ownCmd, pkgexampleCmd, BazCmd,
},

// Add custom BonzaiMark template extensions (or overwrite existing ones).
Expand Down Expand Up @@ -152,7 164,7 @@ var Cmd = &Z.Cmd{
// command.

// exported branch
var Bar = &Z.Cmd{
var BarCmd = &Z.Cmd{
Name: `bar`,

// Aliases are not commands but will be replaced by their target names
Expand All @@ -164,7 176,7 @@ var Bar = &Z.Cmd{
// Commands are the main way to compose other commands into your
// branch. When in doubt, add a command, even if it is in the same
// file.
Commands: []*Z.Cmd{help.Cmd, file},
Commands: []*Z.Cmd{help.Cmd, fileCmd},

// Call first-class functions can be highly detailed, refer to an
// existing function someplace else, or can call high-level package
Expand All @@ -189,7 201,7 @@ var Bar = &Z.Cmd{
// FROM SCRATCH containers that use a Bonzai tree as the core binary).

// private leaf
var file = &Z.Cmd{
var fileCmd = &Z.Cmd{
Name: `file`,
Commands: []*Z.Cmd{help.Cmd},
Comp: compfile.New(),
Expand All @@ -213,7 225,7 @@ var file = &Z.Cmd{
// * As a high-level library unrelated to Bonzai at all (see "pkg")

// private leaf
var pkgexample = &Z.Cmd{
var pkgexampleCmd = &Z.Cmd{
Name: `pkgexample`,

// Several argument checks are available to keep your Call functions
Expand Down
4 changes: 2 additions & 2 deletions cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 20,7 @@ import (
// install github.com/rwxrob/bonzai-example@latest" to ensure you have
// no errors with your versions, caching server, or dependencies.

func TestBar(t *testing.T) {
func TestBarCmd(t *testing.T) {

// capture the output
buf := new(bytes.Buffer)
Expand All @@ -29,7 29,7 @@ func TestBar(t *testing.T) {
defer log.SetFlags(log.Flags())
defer log.SetOutput(os.Stderr)

Bar.Call(nil)
BarCmd.Call(nil)

t.Log(buf)
if buf.String() != "would bar stuff\n" {
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 3,12 @@ module github.com/rwxrob/bonzai-example
go 1.18

require (
github.com/rwxrob/bonzai v0.12.2
github.com/rwxrob/compfile v0.1.10
github.com/rwxrob/conf v0.6.3
github.com/rwxrob/bonzai v0.13.0
github.com/rwxrob/compfile v0.1.11
github.com/rwxrob/conf v0.7.0
github.com/rwxrob/config v0.4.3
github.com/rwxrob/help v0.4.2
github.com/rwxrob/vars v0.3.2
github.com/rwxrob/help v0.5.0
github.com/rwxrob/vars v0.4.0
)

require (
Expand All @@ -22,13 22,13 @@ require (
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mikefarah/yq/v4 v4.24.5 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/rwxrob/compcmd v0.2.2 // indirect
github.com/rwxrob/compcmd v0.2.3 // indirect
github.com/rwxrob/fn v0.3.3 // indirect
github.com/rwxrob/fs v0.5.1 // indirect
github.com/rwxrob/scan v0.6.1 // indirect
github.com/rwxrob/structs v0.6.0 // indirect
github.com/rwxrob/term v0.2.6 // indirect
github.com/rwxrob/to v0.5.2 // indirect
github.com/rwxrob/to v0.5.3 // indirect
github.com/rwxrob/yq v0.2.4 // indirect
github.com/timtadh/data-structures v0.5.3 // indirect
github.com/timtadh/lexmachine v0.2.2 // indirect
Expand Down
14 changes: 14 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,8 @@ github.com/rwxrob/bonzai v0.12.1 h1:/1g5B8WrR3AktCqjCxAUDJZCDGisXs2OKt4bd7CvJYg=
github.com/rwxrob/bonzai v0.12.1/go.mod h1:zisCd2LCW9yR3w3csCWkqmUGnOcUOItjatYdSplJtmk=
github.com/rwxrob/bonzai v0.12.2 h1:A9Pwp89QgExsBXwxxrctmrHx7Z Tr0HAJ8aKwWFZmrA=
github.com/rwxrob/bonzai v0.12.2/go.mod h1:zisCd2LCW9yR3w3csCWkqmUGnOcUOItjatYdSplJtmk=
github.com/rwxrob/bonzai v0.13.0 h1:zCfB3A7NEPu4Sqss 7lQUFpCthD2oDiFKcUDsYqpGJQ=
github.com/rwxrob/bonzai v0.13.0/go.mod h1:zisCd2LCW9yR3w3csCWkqmUGnOcUOItjatYdSplJtmk=
github.com/rwxrob/compcmd v0.1.5 h1:nD6ZeMYmYYr 5z6gElF0sWhaJu3OwLMBz18euf6oa2k=
github.com/rwxrob/compcmd v0.1.5/go.mod h1:PKYptsH7zRebXt3P9Gk1GCnWp4KemJ/HgG9slmXINaQ=
github.com/rwxrob/compcmd v0.1.6 h1:jswlgUwSJuCe8h0zIvCS13CePE8UGKwib7YegyV bfU=
Expand All @@ -65,6 67,8 @@ github.com/rwxrob/compcmd v0.2.1 h1:WNSnoAbiV7bbB9YBr0OsIGzvfPVMSrSkOPbx/bi4Y8Q=
github.com/rwxrob/compcmd v0.2.1/go.mod h1:qqI0Gkm 8z 7ZLFL JySsCA05o9HgNI1X iJbinxduI=
github.com/rwxrob/compcmd v0.2.2 h1:IS3oZIyD DBBzjodAvk2KDF7Zn0fvyEkpPOxkOml4xQ=
github.com/rwxrob/compcmd v0.2.2/go.mod h1:uedtEwRMTXilhjH7yKQPOfgEBWajpb9zz4vKOXtSwtA=
github.com/rwxrob/compcmd v0.2.3 h1:L05 CnLoJWpRp745 Hpz8fB0dz8SIzH0 uwSZxIZgEM=
github.com/rwxrob/compcmd v0.2.3/go.mod h1:fS9smeE6XIb/2511RU6618IimOJjg0tC69eXISxaxU4=
github.com/rwxrob/compfile v0.1.6 h1:xd5D1MmqKICGg/TmOx4eQN19M/rdVqpZ/A8DFcwa7Tc=
github.com/rwxrob/compfile v0.1.6/go.mod h1:H4/1mhWDqOYicyu5GdZeH3kCOdH30EgKsfzFmp89pgg=
github.com/rwxrob/compfile v0.1.7 h1:mmeH1eZbgJ xN Y3bWFiG/ yt/2hrq8qe2hLNhmKtMU=
Expand All @@ -73,6 77,8 @@ github.com/rwxrob/compfile v0.1.9 h1:dOCi mwaZt/rlIbTQgHU1MQk07C nFUQHO7rcukvC E
github.com/rwxrob/compfile v0.1.9/go.mod h1:c7BH9OxC05Uc0fVo6aTEYQJHf2hqbxIgnyJJCWzwbaQ=
github.com/rwxrob/compfile v0.1.10 h1:8WINthRqh6oU6ccsgqMIVFlOR2mGF9Rp2J/LTEnrGcE=
github.com/rwxrob/compfile v0.1.10/go.mod h1://iBjQnw604pmOkPwM15TD2R1tJafX2LdiZOvytOhrc=
github.com/rwxrob/compfile v0.1.11 h1:yydKh22uEKH1DZspxsD/JFpeaReKzRWDbe/MwSNONB8=
github.com/rwxrob/compfile v0.1.11/go.mod h1:kEIa7tRsoFY8GiG eVjiImXjXhBqiiGEk2C2WezPX5Q=
github.com/rwxrob/conf v0.5.0 h1:sFgDDClUd4EDq Dt5lHm4o9hsN3VH0RJ7gpgY2jSQdg=
github.com/rwxrob/conf v0.5.0/go.mod h1:J5r10MyteafcKnoDh5YHOBNH0zuVYO9x6GKUtgHXKsY=
github.com/rwxrob/conf v0.5.1 h1:z4iGt1RxvwlatGOvR/dVUycivRicEJ5jUMG9r6qKq/o=
Expand All @@ -87,6 93,8 @@ github.com/rwxrob/conf v0.6.2 h1:lI2D0EnWdEizxuKLSZvK4k6UHgAbuh5apC38K3rxGuo=
github.com/rwxrob/conf v0.6.2/go.mod h1:e/59yaowalxCWPv3maUMY497JQzZbucun9vscT 52 w=
github.com/rwxrob/conf v0.6.3 h1:AUfF3xP0OApAsXU4c8BG1Fr9vLx6YxDh8cGyg JuLgE=
github.com/rwxrob/conf v0.6.3/go.mod h1:Cea53dJQv6msfg7WXC30ZDJzAW971 6bh2hdF98BpZo=
github.com/rwxrob/conf v0.7.0 h1:bsTYPEqEqqhriY835wJ75EBm2G8kwunK1PwxqU30v5M=
github.com/rwxrob/conf v0.7.0/go.mod h1:DR9sMN6Wm/4/KIazsEdMxVeNK94eiAPatjUal8k7ilw=
github.com/rwxrob/config v0.4.0 h1:hf69wzRCfXuPtDD50vDEPxIoLk0DKs3YT2lf1rmyK7g=
github.com/rwxrob/config v0.4.0/go.mod h1:LfHHwWd7Jzt 8b1v6Vel3i3aOYt2OX50gJY38qx3 6Q=
github.com/rwxrob/config v0.4.2 h1:ZD3ZUO p/kH 4k8/OSm3bHEfTKEEFB9v3LruwYSGGYc=
Expand Down Expand Up @@ -119,6 127,8 @@ github.com/rwxrob/help v0.4.1 h1:WatjhJebk 5lPd zrUa2t0T3h/ w4YvvUuNf8cflNhc=
github.com/rwxrob/help v0.4.1/go.mod h1:eZoUfqKNxqEomnMwn11ipeDU5kVvSOrpFjaj7rHnYLQ=
github.com/rwxrob/help v0.4.2 h1:fvH/4ErmWBSld2ErubfpNSUnkuA4hCnJ1NuXspytmms=
github.com/rwxrob/help v0.4.2/go.mod h1:l7XtT4J75 bzTnsLZcIpMAgt2edLnA26U9cbVbY6DY4=
github.com/rwxrob/help v0.5.0 h1:wEARG5oj9/d3pVeho1tvk1jLVPU5ZujQ5o44VvlNeCI=
github.com/rwxrob/help v0.5.0/go.mod h1:rgLDEcJjYuz4MTu6c2J/T0mI9GpXAaqQ1BWKLdKP3mc=
github.com/rwxrob/scan v0.6.1 h1:KMGi/kV7TY4pcVo8H/HVwwyQZ2gBFNQI3g7tT121Voo=
github.com/rwxrob/scan v0.6.1/go.mod h1:eF28AgH3YUvP7E9UrhjePRUyLq3Gh7 fR28P7Z/Ku4E=
github.com/rwxrob/structs v0.5.1 h1:epff 4ihej EgsQx0qOAS/cn7ix3qSLor0M/AjWiV3M=
Expand All @@ -133,6 143,8 @@ github.com/rwxrob/to v0.4.6 h1:VXYmc2wI3aGq3HzecgMWYLiFZRVy1PlZIVOGRt0S8V0=
github.com/rwxrob/to v0.4.6/go.mod h1:lojk6scni4ZRYjnKJO/f2DVRTW0BB6l9LZQ/NvZZt4Y=
github.com/rwxrob/to v0.5.2 h1:BK2xKkWNhnR5TwEzbsPpXjGODFrTrgZfXzfEdtgCeyU=
github.com/rwxrob/to v0.5.2/go.mod h1:lojk6scni4ZRYjnKJO/f2DVRTW0BB6l9LZQ/NvZZt4Y=
github.com/rwxrob/to v0.5.3 h1:CTkQuXXjrv9NhRDWH0zafu9aRWXwvw VWWqPNYXLZaY=
github.com/rwxrob/to v0.5.3/go.mod h1:lojk6scni4ZRYjnKJO/f2DVRTW0BB6l9LZQ/NvZZt4Y=
github.com/rwxrob/vars v0.2.4 h1:sva6TVbUzHZbfcFHy3QFWEAPPp/1TmITiR1Esm55Lts=
github.com/rwxrob/vars v0.2.4/go.mod h1:fOZdyqFHVjbBbjgjh70RUFg17/xYhTz5DNv5UNWcvtk=
github.com/rwxrob/vars v0.2.7 h1:DoD9NKgBvisy UY4onfahgQaJAHQXVUc7rhSMQoqfnA=
Expand All @@ -145,6 157,8 @@ github.com/rwxrob/vars v0.3.1 h1:17XZIEK9Fdj5pMoX2LDY5AaiPT/5FPZ4 Fce5UrKM1M=
github.com/rwxrob/vars v0.3.1/go.mod h1:VlbLqDq6Pt7zFk3RdmVwGf57YkhAvgss1icAnf/Nha4=
github.com/rwxrob/vars v0.3.2 h1:gtvkSejawtBLJZvjv7QkndS2SNKPLBMLnUtqnkRDDVc=
github.com/rwxrob/vars v0.3.2/go.mod h1:KTqAJz/EcoSgkSDm8C/E0Ov3IfviVo0nCxBoW79s5Ag=
github.com/rwxrob/vars v0.4.0 h1:7aUdiGm3zAepyxFH1h7IDYOTV3ckq0Lo/ trqD8W5y8=
github.com/rwxrob/vars v0.4.0/go.mod h1:0jfIBWWVU38UZAUilH57vbXJ6cQKuiTg32z8G6q1pNU=
github.com/rwxrob/yq v0.2.3 h1:7eYCOrrhqn9eZ gYUVjPtpSyaNoEhs1Z wDR3WOcDqY=
github.com/rwxrob/yq v0.2.3/go.mod h1:Gy4DVShCPq5Md2PpmHaUdyS8KKbJxUy4OOmGawls/Ao=
github.com/rwxrob/yq v0.2.4 h1:NMQLDM/wBYN9IgJC0NlxcDs9COC/fDIdCi5DC9ijvUA=
Expand Down
2 changes: 1 addition & 1 deletion own.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 10,7 @@ import (
)

// private leaf
var own = &Z.Cmd{
var ownCmd = &Z.Cmd{
Name: `own`,
Call: func(caller *Z.Cmd, none ...string) error {
log.Print("I'm in my own file.")
Expand Down

0 comments on commit 92ee6c6

Please sign in to comment.