internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B2S

func B2S(b []byte) string

func S2B

func S2B(s string) []byte

func SameString

func SameString(a, b string) bool

Constant-time string comparison

Types

type BinaryAppender

type BinaryAppender interface {
	// AppendText appends the binary representation of itself to the end of b
	// (allocating a larger slice if necessary) and returns the updated slice.
	//
	// Implementations must not retain b, nor mutate any bytes within b[:len(b)].
	AppendBinary([]byte) ([]byte, error)
}

BinaryAppender is the interface implemented by an object that can append the binary representation of itself. If a type implements both BinaryAppender and [BinaryMarshaler], then v.MarshalBinary() must be semantically identical to v.AppendBinary(nil).

type TextAppender

type TextAppender interface {
	// AppendText appends the textual representation of itself to the end of b
	// (allocating a larger slice if necessary) and returns the updated slice.
	//
	// Implementations must not retain b, nor mutate any bytes within b[:len(b)].
	AppendText(b []byte) ([]byte, error)
}

TextAppender is the interface implemented by an object that can append the textual representation of itself. If a type implements both TextAppender and [TextMarshaler], then v.MarshalText() must be semantically identical to v.AppendText(nil).

Directories

Path Synopsis
Package gzip implements reading of gzip format compressed files, as specified in RFC 1952.
Package gzip implements reading of gzip format compressed files, as specified in RFC 1952.
integer.go
integer.go

Jump to

Keyboard shortcuts

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