MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / printCommunityScriptDetailsTable

Function printCommunityScriptDetailsTable

internal/cli/community_scripts.go:618–638  ·  view source on GitHub ↗
(script communityScriptOutput)

Source from the content-addressed store, hash-verified

616}
617
618func printCommunityScriptDetailsTable(script communityScriptOutput) {
619 printTable([]string{"FIELD", "VALUE"}, [][]string{
620 {"Name", script.Name},
621 {"Slug", script.Slug},
622 {"Type", script.Type},
623 {"Description", script.Description},
624 {"Categories", strings.Join(script.Categories, ", ")},
625 {"Source Repo", script.SourceRepo},
626 {"Script Path", script.ScriptPath},
627 {"Script URL", script.ScriptURL},
628 {"Website", script.Website},
629 {"Documentation", script.Documentation},
630 {"Config Path", script.ConfigPath},
631 {"Interface Port", fmt.Sprintf("%d", script.InterfacePort)},
632 {"Updateable", fmt.Sprintf("%t", script.Updateable)},
633 {"Privileged", fmt.Sprintf("%t", script.Privileged)},
634 {"Development", fmt.Sprintf("%t", script.IsDev)},
635 {"Disabled", fmt.Sprintf("%t", script.IsDisabled)},
636 {"Deleted", fmt.Sprintf("%t", script.IsDeleted)},
637 })
638}
639
640func completeCommunityScriptSlugs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
641 if len(args) != 0 {

Callers 1

runCommunityScriptsShowFunction · 0.85

Calls 1

printTableFunction · 0.85

Tested by

no test coverage detected