cutypes

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cutypes provides common types, definitions for cliui

Index

Constants

View Source
const (
	// CodeOK success exit code
	CodeOK = 0
	// CodeERR default error exit code
	CodeERR = 2
)
View Source
const TextPosMiddle = TextPosCenter

Variables

View Source
var (
	Input  io.Reader = os.Stdin
	Output io.Writer = os.Stdout
)

the global input output stream

Functions

func CustomIO

func CustomIO(in io.Reader, out io.Writer)

CustomIO stream

func ResetIO

func ResetIO()

ResetIO stream

func ResetInput

func ResetInput()

ResetInput stream

func ResetOutput

func ResetOutput()

ResetOutput stream

func SetInput

func SetInput(in io.Reader)

SetInput stream

func SetOutput

func SetOutput(out io.Writer)

SetOutput stream

Types

type BorderPos

type BorderPos uint8
const (
	BorderPosTop BorderPos = iota
	BorderPosBottom
	BorderPosLeft
	BorderPosRight
	BorderPosTB // Top & Bottom
	BorderPosLR // Left & Right
	BorderPosAll
)

type TextPos

type TextPos uint8
const (
	TextPosLeft TextPos = iota
	TextPosCenter
	TextPosRight
)

Jump to

Keyboard shortcuts

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