Do a large chunk of the move to go
This commit moves a huge chunk of the code to go. The TODO.md document indicates what is left to be done.
This commit is contained in:
parent
db2ad9b4bd
commit
7b38fdd801
93 changed files with 4689 additions and 645 deletions
27
cmd/config.go
Normal file
27
cmd/config.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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{
|
||||
NeedsConfig: 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue