# bytedance/go-tagexpr

An interesting go struct tag expression syntax for field validation, etc.

Repository: https://github.com/bytedance/go-tagexpr
Canonical: https://ross.abutalabs.com/products/go-tagexpr
Language: Go
License: Apache-2.0
License Family: permissive
Topics: struct-tag, go, dsl, expression, validator, binding
Archived: true
Last push: 2024-03-13T21:29:28+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2784, "days_push": 903, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1727, forks 139 (observed 2026-08-28T04:05:28.283630+00:00)

## What it is
go-tagexpr is a Go library that implements an expression syntax evaluated via struct tags, enabling declarative field validation and value evaluation. It includes a powerful struct-tag-based validator and an HTTP request parameter binder built on the same expression engine.

## Use cases
- validate struct fields with expressive rules in go struct tags
- bind and validate http request parameters in go
- evaluate expressions against nested struct fields
- write custom validation rules referencing other fields in a struct
- replace go-playground validator with a tag expression dsl

## When to choose
- you need cross-field or conditional validation logic expressed directly in struct tags
- you want a single library for both validation and http parameter binding in go
- you need to evaluate custom expressions over struct data at runtime

## When to avoid
- you only need simple required/type checks that standard validators cover
- your project is not written in go
- you prefer validation rules defined in code rather than struct tags

## Facets
- artifact type: library
- maturity: stable
- function: form-handling, serialization, parser, developer-tools
- domain: developer-tools, web-development, backend, apis
- platform: go, cross-platform
- tags: struct-tags, expression-language, dsl, field-validation, request-binding, validator

## Member repositories
- bytedance/go-tagexpr (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:28.283630+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:32:15.891223+00:00, confidence not recorded.
  - readme: https://github.com/bytedance/go-tagexpr (fetched 2026-08-28T04:05:28.283630+00:00, sha 62da66baf787)
- Data as of 2026-08-30T08:39:29.467469+00:00.
