wisski-cloud-distillery/cmd/config.go
Tom Wiesing 35bb95c5ca
Show a warning when using wrong executable
This commit updates the 'wdcli' command to show a warning when using the
wrong executable.
2022-09-09 13:35:02 +02:00

27 lines
621 B
Go

package cmd
import (
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
"github.com/FAU-CDI/wisski-distillery/env"
)
// Config is the configuration command
var Config wisski_distillery.Command = config{}
type config struct {
}
func (s config) Description() wisski_distillery.Description {
return wisski_distillery.Description{
Requirements: env.Requirements{
NeedsDistillery: true,
},
Command: "config",
Description: "Prints information about configuration",
}
}
func (s config) Run(context wisski_distillery.Context) error {
context.Printf("%#v", context.Environment.Config)
return nil
}