package config import ( "bytes" "context" "fmt" "github.com/BurntSushi/toml" "github.com/urfave/cli/v3" ) // GetConfig Command func GetConfig() *cli.Command { return &cli.Command{ Name: "get", Usage: "read configuration file", Action: getConfigAction, } } // getConfigAction logic for GetConfig func getConfigAction(context context.Context, c *cli.Command) error { configFile, err := ReadConfig() if err != nil { return err } var buf bytes.Buffer if err := toml.NewEncoder(&buf).Encode(configFile); err != nil { return err } tomlString := buf.String() fmt.Println(tomlString) return nil }