printer

package
v0.0.0-...-bbef582 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Activities

func Activities(activities []*models.Activity, users []*models.User)

func Black

func Black(s string) string

func Blue

func Blue(s string) string

func CustomActions

func CustomActions(actions []*models.CustomAction)

func Cyan

func Cyan(s string) string

func Done

func Done()

func Error

func Error(err error)

func ErrorText

func ErrorText(msg string)

func Green

func Green(s string) string

func Info

func Info(msg string)

func Init

func Init(printer Printer)

func Magenta

func Magenta(s string) string

func Notification

func Notification(notification *models.Notification)

func Notifications

func Notifications(notifications []*models.Notification)

func Number

func Number(number int64)

func Project

func Project(project *models.Project)

func Projects

func Projects(projects []*models.Project)

func Red

func Red(s string) string

func Status

func Status(status *models.Status)

func StatusList

func StatusList(status []*models.Status)

func Types

func Types(types []*models.Type)

func User

func User(user *models.User)

func Users

func Users(users []*models.User)

func Versions

func Versions(versions []*models.Version)

func White

func White(s string) string

func WithSpinner

func WithSpinner[T any](f function[T]) (T, error)

func WorkPackage

func WorkPackage(workPackage *models.WorkPackage)

func WorkPackages

func WorkPackages(workPackages []*models.WorkPackage)

func Yellow

func Yellow(s string) string

Types

type ConsolePrinter

type ConsolePrinter struct{}

func (*ConsolePrinter) Printf

func (printer *ConsolePrinter) Printf(format string, a ...any) (n int, err error)

func (*ConsolePrinter) Println

func (printer *ConsolePrinter) Println(a ...any) (n int, err error)

type Printer

type Printer interface {
	Printf(format string, a ...any) (n int, err error)
	Println(a ...any) (n int, err error)
}

type TestingPrinter

type TestingPrinter struct {
	Result string
}

func (*TestingPrinter) Printf

func (printer *TestingPrinter) Printf(format string, a ...any) (n int, err error)

func (*TestingPrinter) Println

func (printer *TestingPrinter) Println(a ...any) (n int, err error)

func (*TestingPrinter) Reset

func (printer *TestingPrinter) Reset()

Jump to

Keyboard shortcuts

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