Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PrintCommand = cli.Command{ Name: "print", Usage: "List Granted Settings", Action: func(c *cli.Context) error { cfg, err := config.Load() if err != nil { return err } data := [][]string{ {"logging verbosity", debug.CliVerbosity.String()}, {"update-checker-api-url", c.String("update-checker-api-url")}, } for k, v := range structs.Map(cfg) { data = append(data, []string{k, fmt.Sprint(v)}) } table := tablewriter.NewWriter(color.Error) table.SetHeader([]string{"SETTING", "VALUE"}) table.SetAutoWrapText(false) table.SetAutoFormatHeaders(true) table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) table.SetAlignment(tablewriter.ALIGN_LEFT) table.SetCenterSeparator("") table.SetColumnSeparator("") table.SetRowSeparator("") table.SetRowLine(true) table.SetHeaderLine(false) table.SetBorder(false) table.SetTablePadding("\t") table.SetNoWhiteSpace(true) table.AppendBulk(data) table.Render() return nil }, }
View Source
var SettingsCommand = cli.Command{ Name: "settings", Usage: "Manage Granted settings", Subcommands: []*cli.Command{&PrintCommand}, Action: PrintCommand.Action, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.