Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(store): rename depth family to cascade (#252) #253

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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