Skip to content

Commit

Permalink
ref(store): rename depth family to cascade (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
plastikfan committed Dec 28, 2023
1 parent 38e1734 commit ca4e246
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions src/assistant/i18n/messages-command.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,29 +140,29 @@ func (td LanguageParamUsageTemplData) Message() *Message {
}
}

// DepthDepthParamUsageTemplData
// CascadeDepthParamUsageTemplData
// 🧊
type DepthDepthParamUsageTemplData struct {
type CascadeDepthParamUsageTemplData struct {
CobrassTemplData
}

func (td DepthDepthParamUsageTemplData) Message() *Message {
func (td CascadeDepthParamUsageTemplData) Message() *Message {
return &Message{
ID: "depth-depth.param-usage",
ID: "cascade-depth.param-usage",
Description: "limits the number of sub directories navigated",
Other: "depth denotes the number of sub directories to navigate",
}
}

// DepthSkimParamUsageTemplData
// CascadeSkimParamUsageTemplData
// 🧊
type DepthSkimParamUsageTemplData struct {
type CascadeSkimParamUsageTemplData struct {
CobrassTemplData
}

func (td DepthSkimParamUsageTemplData) Message() *Message {
func (td CascadeSkimParamUsageTemplData) Message() *Message {
return &Message{
ID: "depth-skim.param-usage",
ID: "cascade-skim.param-usage",
Description: "sets the navigator to not descend into sub directories",
Other: "skim sets the navigator to not descend into sub directories",
}
Expand Down
4 changes: 2 additions & 2 deletions src/store/families_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ var _ = Describe("Families", Ordered, func() {
})
})

DescribeTable("depth family",
DescribeTable("cascade family",
func(entry *familyTE) {
ps := assistant.NewParamSet[store.DepthParameterSet](rootCommand)
ps := assistant.NewParamSet[store.CascadeParameterSet](rootCommand)
if entry.persistent {
ps.Native.BindAll(ps, rootCommand.PersistentFlags())
} else {
Expand Down
10 changes: 5 additions & 5 deletions src/store/family-depth.go → src/store/family-cascade.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"github.com/spf13/pflag"
)

type DepthParameterSet struct {
type CascadeParameterSet struct {
Depth uint
Skim bool
}

func (f *DepthParameterSet) BindAll(
parent *assistant.ParamSet[DepthParameterSet],
func (f *CascadeParameterSet) BindAll(
parent *assistant.ParamSet[CascadeParameterSet],
flagSet ...*pflag.FlagSet,
) {
// --depth
Expand All @@ -24,7 +24,7 @@ func (f *DepthParameterSet) BindAll(

parent.BindUint(
resolveNewFlagInfo(
xi18n.Text(i18n.DepthDepthParamUsageTemplData{}),
xi18n.Text(i18n.CascadeDepthParamUsageTemplData{}),
defaultDepth,
flagSet...,
),
Expand All @@ -39,7 +39,7 @@ func (f *DepthParameterSet) BindAll(

parent.BindBool(
resolveNewFlagInfo(
xi18n.Text(i18n.DepthSkimParamUsageTemplData{}),
xi18n.Text(i18n.CascadeSkimParamUsageTemplData{}),
defaultSkim,
flagSet...,
),
Expand Down

0 comments on commit ca4e246

Please sign in to comment.