Skip to content

ezpkg/testingz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopherz

ezpkg.io/testingz

PkgGoDev GitHub License version

Packages testingz provides utilities for testing. Support ignoring spaces and using placeholders.

Installation

go get -u ezpkg.io/[email protected]

Examples

formatted, isDiff := testingz.DiffByChar("code: 123A", "code: ███A")
// isDiff: true

formatted, isDiff := testingz.DiffByCharZ("code: 123A", "code: ███A")
// isDiff: false

// placeholder is useful for comparing tests with uuid or random values
formatted, isDiff := testingz.DiffByLineZ(left, right)
left := "id: ████\ncode: AF███\nname: Alice\n"
right := "id: 1234\ncode: AF123\nname: Alice\n"
// isDiff: false

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

Packages

No packages published

Languages