helpers

package
v0.0.0-...-17bac27 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineOwnerAndRepo

func DetermineOwnerAndRepo(args ...string) (string, string, error)

Determine the owner and repo name from arguments passed to the command ... or from the current repository.

func ListExamples

func ListExamples(examples []string) string

ListExamples takes a slice of examples (strings) and returns a string containing the examples, each on a new line, indented by two spaces. This is used to display examples in the help text for cobra commands.

func OpenInBrowser

func OpenInBrowser(url string) error

OpenInBrowser opens the specified URL in the default browser.

func Prettify

func Prettify(input any) (string, error)

Prettify takes an input of any type and returns a prettified JSON string. If the input cannot be converted to JSON, or the JSON cannot be prettified, an error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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