dockertest VS validator

Compare dockertest vs validator and see what are their differences.

dockertest

Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. (by ory)

validator

:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving (by go-playground)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
dockertest validator
48 68
3,914 15,361
2.0% 2.6%
4.5 7.4
about 1 month ago 13 days ago
Go Go
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

dockertest

Posts with mentions or reviews of dockertest. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-27.

validator

Posts with mentions or reviews of validator. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-03.
  • API completa em Golang - Parte 7
    3 projects | dev.to | 3 Feb 2024
  • API completa em Golang - Parte 3
    2 projects | dev.to | 16 Dec 2023
  • Is there any equivalent to pydantic, serde, etc?
    8 projects | /r/golang | 6 Dec 2023
    go-playground/validator
    8 projects | /r/golang | 6 Dec 2023
    Go uses zero values to provide sensible default values. It's a design choice. With a quick Google you'll find several libraries such as https://github.com/go-playground/validator or https://github.com/asaskevich/govalidator. I use validator whenever I need to ensure any JSON I unmarshalled is correct.
  • API completa em Golang - Parte 1
    8 projects | dev.to | 1 Dec 2023
  • Yet another validator 0.9.5
    2 projects | /r/golang | 5 Sep 2023
    Now it has most of the Playground validator's common checks and a few own tricks.
  • Openapi server generation
    3 projects | /r/golang | 25 Aug 2023
    In Go I've found this package - https://github.com/go-playground/validator. It seems popular in the community, but it is tag-based. It looks like if I wanted to use it - I would have to basically duplicate structs.
  • Request Validations in Go REST API
    6 projects | /r/golang | 21 May 2023
    I use https://github.com/go-playground/validator, but honestly, I am not a fan. I just haven’t found anything better.
  • Tools besides Go for a newbie
    36 projects | /r/golang | 26 Mar 2023
    IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here
  • popularity behind pydantic
    2 projects | /r/Python | 24 Mar 2023
    I work in Go now, it's crazy poor in that regard - let's just mention for instance "zero values" ( so things can remain uninitialized with a default value you can't choose ), recurring questions around "empty vs null vs not set", and everyone using go-playground/validator where you attach rules as comments ( "tags" really, but it's barely the same thing ) that are interpreted at runtime, extremely cumbersome to extend. And all that with an insane amount of boilerplate and footguns. But what really takes the cake: if you dare saying it's extremely weak you'll get shut down by the community. You're supposed to praise it, and indeed, hate python ( you know, that toy language that didn't evolve since 2008 ).

What are some alternatives?

When comparing dockertest and validator you can also consider the following projects:

testcontainers-go - Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.

ozzo-validation - An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.

govalidator - [Go] Package of validators and sanitizers for strings, numerics, slices and structs

grpc-go - The Go language implementation of gRPC. HTTP/2 based RPC

viper - Go configuration with fangs

uuid - Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.

fiber-swagger - fiber middleware to automatically generate RESTful API documentation with Swagger 2.0.

Validate - ⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器,支持自定义验证器、自定义消息、字段翻译。

Echo - High performance, minimalist Go web framework

Password validator library for Go - Flexible and customizable password validation

mockaroo - Mock-A-🦘 (mock-aa-roo) a comprehensive HTTP/HTTPS interface mocking tool for all your development and testing needs!

chi - lightweight, idiomatic and composable router for building Go HTTP services