WarningType -> Warning
parent
3b9ed0bed4
commit
b99304eac3
|
|
@ -91,7 +91,7 @@ var printProfilesTable = func() {
|
|||
table.Render()
|
||||
|
||||
if invalidProfiles != nil {
|
||||
out.T(out.WarningType, "Found {{.number}} invalid profile(s) ! ", out.V{"number": len(invalidProfiles)})
|
||||
out.T(out.Warning, "Found {{.number}} invalid profile(s) ! ", out.V{"number": len(invalidProfiles)})
|
||||
for _, p := range invalidProfiles {
|
||||
out.T(out.Empty, "\t "+p.Name)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ func IsValidDriver(string, name string) error {
|
|||
|
||||
// RequiresRestartMsg returns the "requires restart" message
|
||||
func RequiresRestartMsg(string, string) error {
|
||||
out.T(out.WarningType, "These changes will take effect upon a minikube delete and then a minikube start")
|
||||
out.T(out.Warning, "These changes will take effect upon a minikube delete and then a minikube start")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ var mountCmd = &cobra.Command{
|
|||
|
||||
// An escape valve to allow future hackers to try NFS, VirtFS, or other FS types.
|
||||
if !supportedFilesystems[cfg.Type] {
|
||||
out.T(out.WarningType, "{{.type}} is not yet a supported filesystem. We will try anyways!", out.V{"type": cfg.Type})
|
||||
out.T(out.Warning, "{{.type}} is not yet a supported filesystem. We will try anyways!", out.V{"type": cfg.Type})
|
||||
}
|
||||
|
||||
bindIP := ip.String() // the ip to listen on the user's host machine
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ func startKicServiceTunnel(svc, configName string) {
|
|||
service.PrintServiceList(os.Stdout, data)
|
||||
|
||||
openURLs(svc, urls)
|
||||
out.T(out.WarningType, "Because you are using docker driver on Mac, the terminal needs to be open to run it.")
|
||||
out.T(out.Warning, "Because you are using docker driver on Mac, the terminal needs to be open to run it.")
|
||||
|
||||
<-ctrlC
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ func runStop(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
if err := killMountProcess(); err != nil {
|
||||
out.T(out.WarningType, "Unable to kill mount process: {{.error}}", out.V{"error": err})
|
||||
out.T(out.Warning, "Unable to kill mount process: {{.error}}", out.V{"error": err})
|
||||
}
|
||||
|
||||
err = kubeconfig.UnsetCurrentContext(profile, kubeconfig.PathFromEnv())
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ func maybeWarnAboutEvalEnv(drver string, name string) {
|
|||
return
|
||||
}
|
||||
out.T(out.Notice, "Noticed that you are using minikube docker-env:")
|
||||
out.T(out.WarningType, `After minikube restart the dockerd ports might have changed. To ensure docker-env works properly.
|
||||
out.T(out.Warning, `After minikube restart the dockerd ports might have changed. To ensure docker-env works properly.
|
||||
Please re-eval the docker-env command:
|
||||
|
||||
'minikube -p {{.profile_name}} docker-env'
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ func FatalT(format string, a ...V) {
|
|||
|
||||
// WarningT is a shortcut for writing a templated warning message to stderr
|
||||
func WarningT(format string, a ...V) {
|
||||
ErrT(WarningType, format, a...)
|
||||
ErrT(Warning, format, a...)
|
||||
}
|
||||
|
||||
// FailureT is a shortcut for writing a templated failure message to stderr
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ func TestOutT(t *testing.T) {
|
|||
}{
|
||||
{Happy, "Happy", nil, "😄 Happy\n", "* Happy\n"},
|
||||
{Option, "Option", nil, " ▪ Option\n", " - Option\n"},
|
||||
{WarningType, "Warning", nil, "⚠️ Warning\n", "! Warning\n"},
|
||||
{Warning, "Warning", nil, "❗ Warning\n", "! Warning\n"},
|
||||
{FatalType, "Fatal: {{.error}}", V{"error": "ugh"}, "💣 Fatal: ugh\n", "X Fatal: ugh\n"},
|
||||
{Issue, "http://i/{{.number}}", V{"number": 10000}, " ▪ http://i/10000\n", " - http://i/10000\n"},
|
||||
{Usage, "raw: {{.one}} {{.two}}", V{"one": "'%'", "two": "%d"}, "💡 raw: '%' %d\n", "* raw: '%' %d\n"},
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ var styles = map[StyleEnum]style{
|
|||
Reconfiguring: {Prefix: "📯 "},
|
||||
Stopping: {Prefix: "✋ "},
|
||||
Stopped: {Prefix: "🛑 "},
|
||||
WarningType: {Prefix: "❗ ", LowPrefix: lowWarning},
|
||||
Warning: {Prefix: "❗ ", LowPrefix: lowWarning},
|
||||
Waiting: {Prefix: "⌛ "},
|
||||
Usage: {Prefix: "💡 "},
|
||||
Launch: {Prefix: "🚀 "},
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const (
|
|||
Reconfiguring
|
||||
Stopping
|
||||
Stopped
|
||||
WarningType
|
||||
Warning
|
||||
Waiting
|
||||
WaitingPods
|
||||
Usage
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ func createSSHConn(name, sshPort, sshKey string, svc *v1.Service) *sshConn {
|
|||
|
||||
if askForSudo {
|
||||
out.T(
|
||||
out.WarningType,
|
||||
out.Warning,
|
||||
"The service {{.service}} requires privileged ports to be exposed: {{.ports}}",
|
||||
out.V{"service": svc.Name, "ports": fmt.Sprintf("%v", privilegedPorts)},
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue