Skip to content

z.go - A collection of frequently used utility functions for Go

License

Notifications You must be signed in to change notification settings

hakadoriya/z.go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

z.go - A collection of frequently used utility functions for Go

license pkg goreportcard workflow workflow codecov sourcegraph

z.go is a collection of frequently used utility functions for Go.

Project Goal

  • The goal of util.go is to clean out the collection of utility functions that are defined all over your multiple Go projects.

Installation

go get -u github.com/hakadoriya/z.go

Packages

Package Summary
buildinfoz buildinfoz package is a simple package that provides the build information of the Go binary.
buildz buildz package provides utilities for go build.
bytez bytez package provides utilities for byte slices.
cliz cliz package provides a set of utilities for building command-line interfaces.
contextz contextz package provides a set of utilities for working with context.Context.
databasez/sqlz sqlz package provides a set of utilities for Go standard database/sql package.
diffz package diffz provides a some diff utilities.
envz encz package provides a simple way to manage environment variables with tagged struct fields.
errorz errorz package provides a function to generate functions that creates errorf function with a stack trace, and utilities for error handling.
genericz genericz package provides a set of utilities for generics.
grpcz/grpclogz grpclogz package provides a set of utilities for Go google.golang.org/grpc/grpclog package.
logz/slogz package slogz provides a some utilities for log/slog.
mapz package mapz provides a some map utilities.
mustz mustz package provides a set of functions that panics if error is not nil.
otelz package otelz provides a some utilities for OpenTelemetry.
otelz/tracez package tracez provides a some utilities for OpenTelemetry Trace.
pathz/filepathz package filepathz provides a some path and path/filepath utilities.
reflectz package reflectz provides a some utilities for Go reflect package.
retryz package retryz provides a some utilities for retry.
runtimez package runtimez provides a some utilities for runtime package.
slicez package slicez provides a some utilities for slice.
stringz package stringz provides a some utilities for string type.
syncz package syncz provides a some utilities for sync package.
testingz/assertz assertz package is a wrapper around testing.TB to provide more helpful functions for testing. assertz.* functions are similar to (testing.TB).Error functions.
testingz package testingz provides a some utilities for testing package.
testingz/requirez requirez package is a wrapper around testing.TB to provide more helpful functions for testing. requirez.* functions are similar to (testing.TB).Fatal functions.
xz/toolz/importz package importz provides a some utilities for golang.org/x/tools/imports package.