Movatterモバイル変換


[0]ホーム

URL:


cliui

package
v0.4.1Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License:CC0-1.0Imports:7Imported by:0

Details

Repository

github.com/coder/wush

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (Green   =Color("#04B575")Red     =Color("#ED567A")Fuchsia =Color("#EE6FF8")Yellow  =Color("#ECFD65")Blue    =Color("#5000ff"))
View Source
var Canceled =xerrors.New("canceled")

Functions

funcBold

func Bold(sstring)string

Bold returns a formatter that renders text in boldif the terminal supports it.

funcBoldFmt

func BoldFmt()pretty.Formatter

BoldFmt returns a formatter that renders text in boldif the terminal supports it.

funcCode

func Code(sstring)string

Code formats code for display.

funcColor

func Color(sstring)termenv.Color

Color returns a color for the given string.

funcField

func Field(sstring)string

Field formats a field for display.

funcKeyword

func Keyword(sstring)string

Keyword formats a keyword for display.

funcPlaceholder

func Placeholder(sstring)string

Placeholder formats a placeholder for display.

funcTimestamp

func Timestamp(ttime.Time)string

Timestamp formats a timestamp for display.

funcValidateNotEmpty

func ValidateNotEmpty(sstring)error

ValidateNotEmpty is a helper function to disallow empty inputs!

funcWrap

func Wrap(sstring)string

Wrap prevents the text from overflowing the terminal.

Types

typeStyles

type Styles struct {Code,DateTimeStamp,Error,Field,Keyword,Placeholder,Prompt,FocusedPrompt,Fuchsia,Warn,Wrap,Disabled,Enabledpretty.Style}
var DefaultStylesStyles

DefaultStyles compose visual elements of the UI.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp