util

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: 3 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.

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

View Source
const (
	InfoTypeInfo    = uiutil.InfoTypeInfo
	InfoTypeSuccess = uiutil.InfoTypeSuccess
	InfoTypeWarn    = uiutil.InfoTypeWarn
	InfoTypeError   = uiutil.InfoTypeError
	InfoTypeUpdate  = uiutil.InfoTypeUpdate
)

Variables

This section is empty.

Functions

func CmdHandler

func CmdHandler(msg tea.Msg) tea.Cmd

CmdHandler wraps a message in a command that returns that message.

func ExecShell

func ExecShell(ctx context.Context, cmdStr string, callback tea.ExecCallback) tea.Cmd

ExecShell parses a shell command string and executes it with exec.Command. Uses shell.Fields for proper handling of shell syntax like quotes and arguments while preserving TTY handling for terminal editors.

func ReportError

func ReportError(err error) tea.Cmd

ReportError reports an error message.

func ReportInfo

func ReportInfo(info string) tea.Cmd

func ReportWarn

func ReportWarn(warn string) tea.Cmd

Types

type ClearStatusMsg

type ClearStatusMsg = uiutil.ClearStatusMsg

type Cursor

type Cursor interface {
	Cursor() *tea.Cursor
}

Cursor is an interface for components that can return a cursor position.

type InfoMsg

type InfoMsg = uiutil.InfoMsg

type InfoType

type InfoType = uiutil.InfoType

type Model

type Model interface {
	Init() tea.Cmd
	Update(tea.Msg) (Model, tea.Cmd)
	View() string
}

Jump to

Keyboard shortcuts

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