Skip to content

ezpkg/bytez

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopherz

ezpkg.io/bytez

PkgGoDev GitHub License version

Package bytez provides utilities for working with byte slices. It aims to extend the standard library bytes package with additional functionality.

Installation

go get -u ezpkg.io/bytez@v0.2.2

Examples

bytez.Buffer

The stdlib bytes.Buffer provides many functions that always return nil error. They have their counterparts in bytez.Buffer that eliminate the need of error handling.

// stdlib: bytes.Buffer
_, err = b.WriteString()
if err != nil {
	return err
}
_, err = fmt.Fprintf(&b, "Hello, %s!", "world")
if err != nil {
	return err
}

// ezpkg.io/bytez.Buffer
b.WriteStringZ()
b.Printf("Hello, %s!", "world")

About ezpkg.io

As I work on various Go projects, I often find myself creating utility functions, extending existing packages, or developing packages to solve specific problems. Moving from one project to another, I usually have to copy or rewrite these solutions. So I created this repository to have all these utilities and packages in one place. Hopefully, you'll find them useful as well.

For more information, see the main repository.

Author

Oliver Nguyen  github

About

Extends the standard library bytes with additional functions.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages