padding

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Left func(pad rune) Padder = NewLeftPadder
View Source
var Right func(pad rune) Padder = NewRightPadder

Right returns a new right-side padder

Functions

This section is empty.

Types

type Padder

type Padder interface {
	Pad(data []byte, length int) []byte
	Unpad(data []byte) []byte
	Inspect() []byte
}
var None Padder = &nonePadder{}

func NewLeftPadder

func NewLeftPadder(pad rune) Padder

func NewRightPadder

func NewRightPadder(pad rune) Padder

NewRightPadder takes the given byte character and returns a padder which pads fields to the right of their values (for left-justified values)

Jump to

Keyboard shortcuts

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