Documentation ¶
Overview ¶
* Copyright (C) 2017-Present Pivotal Software, Inc. All rights reserved. * * This program and the accompanying materials are made available under * the terms of the under the Apache License, Version 2.0 (the "License”); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Bold func(format string, a ...interface{}) string = color.New(color.Bold).SprintfFunc() Cyan func(format string, a ...interface{}) string = color.New(color.FgHiCyan).SprintfFunc() Green func(format string, a ...interface{}) string = color.New(color.FgGreen).SprintfFunc() Red func(format string, a ...interface{}) string = color.New(color.FgRed).SprintfFunc() )
Functions ¶
func RunAction ¶
func RunAction(cliConnection plugin.CliConnection, message string, action func() error, writer io.Writer, onFailure func())
Run a given action with a given progress message, writing the output to the given writer and invoking a failure closure if an error occurs.
func RunActionQuietly ¶
func RunActionQuietly(cliConnection plugin.CliConnection, action func() error, writer io.Writer, onFailure func())
Run a given action writing the output to the given writer and invoking a failure closure if an error occurs.
Types ¶
This section is empty.