console

package module
v0.0.0-...-b88c2af Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package console 提供了一些命令行工具的简单封装

Deprecated: 请使用 log 包替代 (github.com/Andrew-M-C/go.util/log)

Reference:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(f string, a ...interface{}) (int, error)

Debugf 在 stdout 打印调试信息

func Errorf

func Errorf(f string, a ...interface{}) (int, error)

Errorf 打错误信息,

func PrintTables

func PrintTables(tab [][]string, opts ...Option) error

PrintTables 格式化地打印表格

func Printf

func Printf(f string, a ...interface{}) (int, error)

Printf 打普通信息, 自动在末尾换行。

func SetDebug

func SetDebug(on bool)

SetDebug 开启/关闭调试

Types

type Option

type Option func(*options)

Option 表示 console 包的额外参数

func WithAlignByCols

func WithAlignByCols(a ...unicode.Align) Option

WithAlignByCols 按列决定对齐方式

func WithSeparator

func WithSeparator(sep string) Option

WithSeparator 指定分隔符

func WithUnifyAlign

func WithUnifyAlign(a unicode.Align) Option

WithUnifyAlign 所有列统一采用对齐方式

Jump to

Keyboard shortcuts

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