utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Emulator string

Installed terminal emulator

View Source
var ErrorLogger *log.Logger
View Source
var InfoLogger *log.Logger

Functions

func ClusterLoginEmulator added in v0.1.0

func ClusterLoginEmulator(clusterID string) error

ClusterLoginEmulator spawns an instance of ocm-container in a new terminal.

func ClusterLoginShell added in v0.1.0

func ClusterLoginShell(clusterID string) *exec.Cmd

ClusterLoginShell spawns an instance of ocm-container in the same shell.

func ConvertMarkdownToHTML added in v0.1.0

func ConvertMarkdownToHTML(body string) io.Reader

func FetchHTMLContent added in v0.1.0

func FetchHTMLContent(URL string, textView *tview.TextView)

func FormatTimestamp

func FormatTimestamp(timestamp string) (string, error)

formatTimestamp formats a given timestamp into a UTC format time and returns the string.

func GetGHReadme added in v0.1.0

func GetGHReadme(owner, repo, path string) (string, error)

func GetOwnerAndRepoName added in v0.1.0

func GetOwnerAndRepoName(str string) (owner, repo string)

func GetReadmePath added in v0.1.0

func GetReadmePath(str string) string

func InitLogger added in v0.1.0

func InitLogger(logWriter io.Writer)

func InitTerminalEmulator added in v0.1.0

func InitTerminalEmulator() string

InitTerminalEmulator tries to set a terminal emulator by trying some known terminal emulators.

func TraverseHTMLDoc added in v0.1.0

func TraverseHTMLDoc(n *html.Node, textView *tview.TextView) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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