go-cmp

Package for comparing Go values in tests (by google)

Go-cmp Alternatives

Similar projects and alternatives to go-cmp

  1. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  2. Gin

    169 go-cmp VS Gin

    Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

  3. go-formatter

    A curated list of awesome Go frameworks, libraries and software

  4. chi

    108 go-cmp VS chi

    lightweight, idiomatic and composable router for building Go HTTP services

  5. mux

    92 go-cmp VS mux

    Discontinued A powerful HTTP router and URL matcher for building Go web servers with 🦍

  6. GORM

    84 go-cmp VS GORM

    The fantastic ORM library for Golang, aims to be developer friendly

  7. Testify

    A toolkit with common assertions and mocks that plays nicely with the standard library

  8. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  9. sqlx

    74 go-cmp VS sqlx

    general purpose extensions to golang's database/sql

  10. pgx

    73 go-cmp VS pgx

    PostgreSQL driver and toolkit for Go

  11. zap

    55 go-cmp VS zap

    Blazing fast, structured, leveled logging in Go.

  12. Squirrel

    Fluent SQL generation for golang

  13. micro

    44 go-cmp VS micro

    Discontinued A microservices platform (by micro)

  14. logrus

    42 go-cmp VS logrus

    Structured, pluggable logging for Go.

  15. zerolog

    40 go-cmp VS zerolog

    Zero Allocation JSON Logger

  16. ginkgo

    20 go-cmp VS ginkgo

    A Modern Testing Framework for Go

  17. urfave/cli

    A simple, fast, and fun package for building command line apps in Go (by urfave)

  18. godotenv

    A Go port of Ruby's dotenv library (Loads environment variables from .env files)

  19. go-testdeep

    Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite

  20. realize

    0 go-cmp VS realize

    Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

  21. spew

    6 go-cmp VS spew

    Implements a deep pretty printer for Go data structures to aid in debugging

  22. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better go-cmp alternative or higher similarity.

go-cmp discussion

Log in or Post with

go-cmp reviews and mentions

Posts with mentions or reviews of go-cmp. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-03.
  • Visualizing Diffs The Myers difference algorithm
    3 projects | news.ycombinator.com | 3 Nov 2022
    This made me think of a couple other interesting things:

    1. you can change which algorithm is used in git diff as multiple are supported

    https://luppeng.wordpress.com/2020/10/10/when-to-use-each-of...

    2. Google has an edit graph implementation in Go in the cmp package

    https://github.com/google/go-cmp/blob/master/cmp/internal/di...

  • How do you do DB preparation in e2e tests?
    3 projects | /r/golang | 20 Oct 2022
    Assertion libraries that people seem to love: - testify (my favorite) - go-cmp is a more barebones library - gotest.tools -- I have never used this but some swear by it
  • alecthomas/assert: A minimalist type-safe drop-in replacement for testify/require
    4 projects | /r/golang | 9 Apr 2022
    it uses https://github.com/google/go-cmp instead of reflect.DeepEqual
  • What annoys you about Go?
    7 projects | /r/golang | 26 Oct 2021
    When I use functional arguments, I either prefix all of the options with the same prefix or put them in a dedicated package (like cmpopts) to help the IDE.
  • Migrating from PHP to Go
    26 projects | /r/golang | 30 Sep 2021
    Checking for equality in tests: https://github.com/google/go-cmp
  • What are your favorite packages to use?
    55 projects | /r/golang | 15 Aug 2021
    oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
  • Go Package for Equality: github.com/google/go-cmp
    2 projects | dev.to | 3 Mar 2021
    One thing to keep in mind about reflect.DeepEqual is because of the way it is implemented you could get positive results when the values are not actually the same, see this comment for reference.
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 23 May 2025
    InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →

Stats

Basic go-cmp repo stats
7
4,399
3.6
3 months ago

Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com

Did you know that Go is
the 4th most popular programming language
based on number of references?