0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-22 08:20:39 +00:00
git-sv/app/commands/config.go
renovate[bot] 2d2de1a5e0
chore(deps): update golang devdeps non-major (#55)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-02-12 09:09:42 +01:00

38 lines
573 B
Go

package commands
import (
"fmt"
"github.com/thegeeklab/git-sv/app"
"github.com/urfave/cli/v2"
"gopkg.in/yaml.v3"
)
func ConfigDefaultHandler() cli.ActionFunc {
return func(_ *cli.Context) error {
cfg := app.GetDefault()
content, err := yaml.Marshal(&cfg)
if err != nil {
return err
}
fmt.Println(string(content))
return nil
}
}
func ConfigShowHandler(cfg *app.Config) cli.ActionFunc {
return func(_ *cli.Context) error {
content, err := yaml.Marshal(cfg)
if err != nil {
return err
}
fmt.Println(string(content))
return nil
}
}