Skip to content

Commit 514cc23

Browse files
committed
chore(app): filter our hidden templates from picker
1 parent 31127fb commit 514cc23

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cmd/lk/app.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ func setupTemplate(ctx context.Context, cmd *cli.Command) error {
255255
WithTheme(util.Theme)
256256
var options []huh.Option[string]
257257
for _, t := range templateOptions {
258+
if t.IsHidden {
259+
continue
260+
}
258261
descStyle := util.Theme.Help.ShortDesc
259262
optionText := t.Name + " " + descStyle.Render("#"+strings.Join(t.Tags, " #"))
260263
options = append(options, huh.NewOption(optionText, t.URL))

pkg/bootstrap/bootstrap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ type Template struct {
7777
Attrs map[string]string `yaml:"attrs" json:"attrs,omitempty"`
7878
Requires []string `yaml:"requires" json:"requires,omitempty"`
7979
IsSandbox bool `yaml:"is_sandbox" json:"is_sandbox,omitempty"`
80+
IsHidden bool `yaml:"is_hidden" json:"is_hidden,omitempty"`
8081
}
8182

8283
type SandboxDetails struct {

0 commit comments

Comments
 (0)