Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/utahta/go-validator
Data validation library for Go
https://github.com/utahta/go-validator
go go-validator golang validation validator
Last synced: about 2 months ago
JSON representation
Data validation library for Go
- Host: GitHub
- URL: https://github.com/utahta/go-validator
- Owner: utahta
- License: mit
- Created: 2018-08-23T15:31:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-24T01:34:01.000Z (about 5 years ago)
- Last Synced: 2024-06-20T05:03:56.066Z (7 months ago)
- Topics: go, go-validator, golang, validation, validator
- Language: Go
- Homepage:
- Size: 155 KB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# go-validator
[![GoDoc Reference](https://godoc.org/github.com/utahta/go-validator?status.svg)](http://godoc.org/github.com/utahta/go-validator)
[![CircleCI](https://circleci.com/gh/utahta/go-validator.svg?style=svg)](https://circleci.com/gh/utahta/go-validator)
[![codecov](https://codecov.io/gh/utahta/go-validator/branch/master/graph/badge.svg)](https://codecov.io/gh/utahta/go-validator)
[![Go Report Card](https://goreportcard.com/badge/github.com/utahta/go-validator)](https://goreportcard.com/report/github.com/utahta/go-validator)
[![GitHub release](https://img.shields.io/github/release/utahta/go-validator.svg)](https://github.com/utahta/go-validator/releases)go-validator is a data validation library for Go.
# Installation
```sh
go get -u github.com/utahta/go-validator
```# Benchmarks
3.2 GHz Intel Core i7, 64 GB 2667 MHz DDR4
```go
goos: darwin
goarch: amd64
pkg: github.com/utahta/go-validator
BenchmarkValidateVarSuccess-12 30000000 58.0 ns/op 0 B/op 0 allocs/op
BenchmarkValidateVarParallelSuccess-12 100000000 12.3 ns/op 0 B/op 0 allocs/op
BenchmarkValidateStructSuccess-12 10000000 184 ns/op 0 B/op 0 allocs/op
BenchmarkValidateStructParallelSuccess-12 50000000 37.1 ns/op 0 B/op 0 allocs/op
BenchmarkValidateStructComplexSuccess-12 1000000 1112 ns/op 32 B/op 3 allocs/op
BenchmarkValidateStructComplexParallelSuccess-12 10000000 222 ns/op 32 B/op 3 allocs/op
BenchmarkValidateVarFailure-12 10000000 187 ns/op 224 B/op 3 allocs/op
BenchmarkValidateStructComplexFailure-12 500000 3740 ns/op 3760 B/op 60 allocs/op
BenchmarkValidateStructComplexParallelFailure-12 1000000 1117 ns/op 3760 B/op 60 allocs/op
```