format

package
v1.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

* Copyright (C) 2016-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 * * https://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.

* Copyright (C) 2016-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 * * https://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

View Source
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 Diagnose

func Diagnose(message string, writer io.Writer, onFailure func())

func Max

func Max(x, y int) int

func RunAction

func RunAction(cliConnection plugin.CliConnection, message string, action Action, 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() (string, 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

type Action

type Action func(progressWriter io.Writer) (string, error)

An Action should write progress indications to the provided writer and should return any output on success as a string return value.

type Table

type Table struct {
	// contains filtered or unexported fields
}

func (*Table) AddRow

func (t *Table) AddRow(row []string)

func (*Table) Entitle

func (t *Table) Entitle(headings []string)

func (*Table) String

func (t *Table) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL