core

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2026 Teradata

Licensed 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

This section is empty.

Functions

func DiffFormatter

func DiffFormatter() *diffview.DiffView

func NewSimpleHelp

func NewSimpleHelp(shortList []key.Binding, fullList [][]key.Binding) help.KeyMap

func Section

func Section(text string, width int) string

func SectionWithInfo

func SectionWithInfo(text string, width int, info string) string

func SelectableButton

func SelectableButton(opts ButtonOpts) string

SelectableButton creates a button with an underlined character and selection state

func SelectableButtons

func SelectableButtons(buttons []ButtonOpts, spacing string) string

SelectableButtons creates a horizontal row of selectable buttons

func SelectableButtonsVertical

func SelectableButtonsVertical(buttons []ButtonOpts, spacing int) string

SelectableButtonsVertical creates a vertical row of selectable buttons

func Status

func Status(opts StatusOpts, width int) string

func Title

func Title(title string, width int) string

Types

type ButtonOpts

type ButtonOpts struct {
	Text           string
	UnderlineIndex int  // Index of character to underline (0-based)
	Selected       bool // Whether this button is selected
}

type KeyMapHelp

type KeyMapHelp interface {
	Help() help.KeyMap
}

type StatusOpts

type StatusOpts struct {
	Icon             string // if empty no icon will be shown
	Title            string
	TitleColor       color.Color
	Description      string
	DescriptionColor color.Color
	ExtraContent     string // additional content to append after the description
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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