Compare commits
1 Commits
renovate/g
...
implement-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45901b67ca |
42
cmd/find-matching-framework.go
Normal file
42
cmd/find-matching-framework.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/kairos-io/enki/pkg/action"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// NewFindMatchingFrameworkCmd returns a new instance of the build-iso subcommand and appends it to
|
||||
// the root command.
|
||||
func NewFindMatchingFrameworkCmd() *cobra.Command {
|
||||
c := &cobra.Command{
|
||||
Use: "find-matching-framework",
|
||||
Short: "Finds the framework image that matches the current OS best",
|
||||
Long: "Finds the framework image that matches the current OS best\n" +
|
||||
"This is best effort and might return a framework image that doesn't work.\n" +
|
||||
"It is expected to work with the official Kairos flavors.",
|
||||
Args: cobra.ExactArgs(0),
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
//return CheckRoot() // TODO: Do we need this?
|
||||
return nil
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
a := action.NewFindMatchingFrameworkAction()
|
||||
result, err := a.Run()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(NewFindMatchingFrameworkCmd())
|
||||
}
|
||||
1
go.mod
1
go.mod
@@ -14,7 +14,6 @@ require (
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.16.0
|
||||
github.com/twpayne/go-vfs v1.7.2
|
||||
github.com/twpayne/go-vfs/v4 v4.3.0
|
||||
k8s.io/mount-utils v0.27.3
|
||||
|
||||
)
|
||||
|
||||
1
go.sum
1
go.sum
@@ -537,7 +537,6 @@ github.com/tredoe/osutil/v2 v2.0.0-rc.16 h1:5A2SKvyB2c3lhPYUIHyFtu6jbaXlaA3Hu5gW
|
||||
github.com/tredoe/osutil/v2 v2.0.0-rc.16/go.mod h1:uLRVx/3pb7Y4RQhG8cQFbPE9ha5r81e6MXpBsxbTAYc=
|
||||
github.com/twpayne/go-vfs v1.7.2 h1:ZNYMAXcu2Av8c109USrSGYm8dIIIV0xPlG19I2088Kw=
|
||||
github.com/twpayne/go-vfs v1.7.2/go.mod h1:1eni2ntkiiAHZG27xfLOO4CYvMR4Kw8V7rYiLeeolsQ=
|
||||
github.com/twpayne/go-vfs/v4 v4.3.0/go.mod h1:tq2UVhnUepesc0lSnPJH/jQ8HruGhzwZe2r5kDFpEIw=
|
||||
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
||||
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
|
||||
|
||||
11
pkg/action/find-matching-framework.go
Normal file
11
pkg/action/find-matching-framework.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package action
|
||||
|
||||
type FindMatchingFrameworkAction struct{}
|
||||
|
||||
func NewFindMatchingFrameworkAction() *FindMatchingFrameworkAction {
|
||||
return &FindMatchingFrameworkAction{}
|
||||
}
|
||||
|
||||
func (a *FindMatchingFrameworkAction) Run() (framework string, err error) {
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user