Documentation ¶
Index ¶
- Constants
- Variables
- func ConfirmYes(format string, a ...interface{}) bool
- func CutColumn(lines [][]interface{}, column int)
- func FixedFormat(lines [][]interface{}, nspace int) string
- func FormatTitle(title []string) ([]interface{}, []interface{})
- func PromptAutoUpgrade(version string) string
- func PromptCancelOpetation(operation string) string
- func PromptCleanService(role, host string, items []string) string
- func PromptCollectService() string
- func PromptErrorCode(code int, description, clue, logpath string) string
- func PromptFormat() string
- func PromptMigrate() string
- func PromptReloadService(id, role, host string) string
- func PromptRemoveCluster(clusterName string) string
- func PromptRestartService(id, role, host string) string
- func PromptScaleOut() string
- func PromptStartService(id, role, host string) string
- func PromptStopService(id, role, host string) string
- func TrimAddress(address string) string
- func TrimContainerId(containerId string) string
- func TrimPluginDescription(decscription string) string
- type DecorateMessage
- type Prompt
Constants ¶
View Source
const ( PROMPT_WARNING = `{{.warning}} ` PROMPT_COMMON_WARNING = `` /* 157-byte string literal not displayed */ PROMPT_CLEAN_SERVICE = `` /* 144-byte string literal not displayed */ PROMPT_COLLECT_SERVICE = `` /* 236-byte string literal not displayed */ PROMPT_TOPOLOGY_CHANGE_NOTICE = `` /* 214-byte string literal not displayed */ PROMPT_FORMAT = `` /* 248-byte string literal not displayed */ PROMPT_CANCEL_OPERATION = `[x] {{.operation}} canceled` DEFAULT_CONFIRM_PROMPT = "Do you want to continue?" )
Variables ¶
View Source
var ( PROMPT_ERROR_CODE = strings.Join([]string{ color.CyanString("---"), color.CyanString("Error-Code: ") + "{{.code}}", color.CyanString("Error-Description: ") + "{{.description}}", "{{- if .clue}}", color.CyanString("Error-Clue: ") + "{{.clue}}", "{{- end}}", color.CyanString("How to Solve:"), color.CyanString(" * Website: ") + "{{.website}}", "{{- if .logpath}}", color.CyanString(" * Log: ") + "{{.logpath}}", "{{- end}}", color.CyanString(" * WeChat: ") + "{{.wechat}}", }, "\n") PROMPT_AUTO_UPGRADE = strings.Join([]string{ color.MagentaString("CurveAdm {{.version}} released, we recommend you to upgrade it."), "Upgrade curveadm to {{.version}}?", }, "\n") )
Functions ¶
func ConfirmYes ¶
func FixedFormat ¶
func FormatTitle ¶
func FormatTitle(title []string) ([]interface{}, []interface{})
func PromptAutoUpgrade ¶ added in v0.2.0
func PromptCancelOpetation ¶ added in v0.0.23
func PromptCleanService ¶
func PromptCollectService ¶
func PromptCollectService() string
func PromptErrorCode ¶ added in v0.1.0
func PromptFormat ¶ added in v0.1.0
func PromptFormat() string
func PromptMigrate ¶ added in v0.0.23
func PromptMigrate() string
func PromptReloadService ¶ added in v0.1.0
func PromptRemoveCluster ¶
func PromptRestartService ¶ added in v0.1.0
func PromptScaleOut ¶ added in v0.0.23
func PromptScaleOut() string
func PromptStartService ¶ added in v0.1.0
func PromptStopService ¶
func TrimAddress ¶ added in v0.1.0
func TrimContainerId ¶
func TrimPluginDescription ¶ added in v0.0.23
Types ¶
type DecorateMessage ¶
Click to show internal directories.
Click to hide internal directories.