bytes

package
v2.286.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package bytes provides byte slice helpers used across go-service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone added in v2.240.0

func Clone(b []byte) []byte

Clone is an alias for bytes.Clone.

func NewBuffer

func NewBuffer(buf []byte) *bytes.Buffer

NewBuffer is an alias for bytes.NewBuffer.

func NewBufferString

func NewBufferString(s string) *bytes.Buffer

NewBufferString is an alias for bytes.NewBufferString.

func NewReader

func NewReader(b []byte) *bytes.Reader

NewReader is an alias for bytes.NewReader.

func String

func String(b []byte) string

String converts b to a string without copying.

The returned string aliases b and is only valid while b's contents remain unchanged.

func TrimSpace

func TrimSpace(s []byte) []byte

TrimSpace is an alias for bytes.TrimSpace.

Types

type Buffer

type Buffer = bytes.Buffer

Buffer is an alias for bytes.Buffer.

Jump to

Keyboard shortcuts

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