Skip to content

Commit

Permalink
Even more test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed May 1, 2023
1 parent 65b7dc3 commit c6f4f30
Show file tree
Hide file tree
Showing 11 changed files with 342 additions and 130 deletions.
17 changes: 9 additions & 8 deletions commandsnew/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"time"

"github.com/bep/cobrakai"
ck "github.com/bep/cobrakai"
"github.com/bep/simplecobra"
ck "github.com/bep/simplecobra"
"github.com/gohugoio/hugo/modules"
"github.com/gohugoio/hugo/parser"
"github.com/gohugoio/hugo/parser/metadecoders"
Expand All @@ -30,17 +30,17 @@ type configCommands struct {
commands []ck.Commander
}

func (c *configCommands) Commands() []cobrakai.Commander {
func (c *configCommands) Commands() []simplecobra.Commander {
return c.commands
}

func (c *configCommands) Init(cd *cobrakai.Commandeer) error {
func (c *configCommands) Init(cd *simplecobra.Commandeer) error {
c.rootCmd = cd.Root.Command.(*rootCommand)
return nil
}

func (c *configCommands) Run(ctx context.Context, args []string) error {
conf, err := c.rootCmd.CommonConfig()
conf, err := c.rootCmd.CommonConfig(nil)
if err != nil {
return err
}
Expand Down Expand Up @@ -71,17 +71,18 @@ type configMountsCommand struct {
configCmd *configCommands
}

func (c *configMountsCommand) Commands() []cobrakai.Commander {
func (c *configMountsCommand) Commands() []simplecobra.Commander {
return nil
}

func (c *configMountsCommand) Init(cd *cobrakai.Commandeer) error {
func (c *configMountsCommand) Init(cd *simplecobra.Commandeer) error {
c.configCmd = cd.Parent.Command.(*configCommands)
return nil
}

func (c *configMountsCommand) Run(ctx context.Context, args []string) error {
root := c.configCmd.rootCmd
conf, err := root.CommonConfig()
conf, err := root.CommonConfig(nil)
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit c6f4f30

Please sign in to comment.