awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
fatih avatar

fatih/structsArchived

0
View on GitHub↗
3,926 stars·700 forks·Go·MIT·13 viewsgodoc.org/github.com/fatih/structs↗

Structs

Structs is a reflection utility and type inspection framework for Go. It provides tools for inspecting, converting, and validating data structures by extracting field names, tags, and values from Go objects.

The library specializes in transforming Go structs into generic maps or slices for serialization and data manipulation. It utilizes tag-driven mapping to determine custom keys and exclusion rules during these transformations.

The project covers broader capabilities including metadata extraction, type validation to verify if variables are structs or pointers, and initialization verification to detect zero-value states across data structures.

Features

  • Struct-to-Map Converters - Transforms Go structs into generic maps of keys and values using custom naming and exclusion rules.
  • Go Struct Reflection Utilities - Reading, modifying, and inspecting fields and tags within Go data structures using reflection.
  • Field Inspection Utilities - Provides methods for retrieving and accessing Go struct field metadata and values via reflection.
  • Go Data Mapping Libraries - Provides mapping and conversion utilities between Go native structs and generic maps.
  • Recursive Pointer Unwrapping - Resolves nested pointers to their base struct types to ensure consistent analysis regardless of memory address.
  • Runtime Type Validation - Ensures type safety by confirming an object is a struct or pointer before applying reflection logic.
  • Struct Metadata Extractors - Retrieves Go struct type names, field tags, and lists of exported fields from objects at runtime.
  • Struct Type Identification - Provides the ability to verify if a variable is a struct or a pointer to a struct for reflection purposes.
  • Go Type Inspection Frameworks - Verifies struct types, detects uninitialized fields, and retrieves package-specific type names in Go.
  • Data Serialization Formats - Converts complex Go data structures into standardized maps or lists for easier serialization.
  • Struct Field Iterators - Provides mechanisms to traverse Go struct fields at runtime to extract values and metadata into generic collections.
  • Reflection-Based Data Mapping - Uses language reflection to transform Go structs into generic data maps based on metadata.
  • Struct Tag Mapping Utilities - Reads struct tags to enforce, ignore, or rename fields during the transformation of data into maps or slices.
  • Reflection Utilities - Provides tools for runtime introspection and object reflection to extract field names and values.
  • Initialization Status Checks - Verifies whether a data structure or its individual fields have been initialized.
  • Struct-to-Slice Converters - Extracts all exported field values from a Go struct into a slice while ignoring empty or specified fields.
  • Type Name Extraction - Implements the extraction of specific package-qualified type names from Go objects.
  • Go Type Validators - Verifies if variables are structs or pointers and checks for zero-value initialization.
  • Zero Value Detection - Detects if a data structure is uninitialized by identifying if all its fields contain zero values.
  • Zero-Value Field Skippers - Detects and skips Go zero-value fields to prevent overwriting data with empty values during transformations.

Star history

Star history chart for fatih/structsStar history chart for fatih/structs

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Structs

Similar open-source projects, ranked by how many features they share with Structs.
  • goccy/go-yamlgoccy avatar

    goccy/go-yaml

    2,189View on GitHub↗

    This library is a Go-based utility for encoding and decoding YAML data into native language structures. It facilitates the transformation of complex objects into human-readable text formats and provides mechanisms for mapping data fields through reflection and custom type handling. The library distinguishes itself by maintaining an intermediate abstract syntax tree, which allows for precise document modifications and the preservation of comments during serialization. It includes a path-based query engine that enables users to navigate, filter, and update document hierarchies without manual it

    Gogogolanggolang-library
    View on GitHub↗2,189
  • jinzhu/copierjinzhu avatar

    jinzhu/copier

    6,172View on GitHub↗

    Copier is a Go library that deep copies data between structs, maps, and slices using reflection-based field mapping and struct tag controls. At its core, it automatically transfers values by matching source and destination fields by name, type, and methods, creating fully independent copies of nested data structures to prevent shared references and unintended mutations. The library distinguishes itself through tag-driven copy rules that give developers fine-grained control over the copying process. Struct tags can enforce mandatory field copying, exclude specific fields from transfer, or map

    Gocopygogolang
    View on GitHub↗6,172
  • arktypeio/arktypearktypeio avatar

    arktypeio/arktype

    7,780View on GitHub↗

    Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida

    TypeScriptjavascriptparsingruntime-typechecking
    View on GitHub↗7,780
  • facebook/prop-typesfacebook avatar

    facebook/prop-types

    4,452View on GitHub↗

    prop-types is a JavaScript object validator and runtime type checker. It serves as a development tool for verifying that object properties match predefined specifications, primarily used to ensure that data passed into React components aligns with expected types. The utility detects data inconsistencies by logging warnings to the console when mismatches occur, rather than throwing exceptions. It employs a stateful warning cache to prevent duplicate logs and restricts validation logic to non-production environments to avoid performance overhead in released builds. The project covers data vali

    JavaScript
    View on GitHub↗4,452
See all 30 alternatives to Structs→

Frequently asked questions

What does fatih/structs do?

Structs is a reflection utility and type inspection framework for Go. It provides tools for inspecting, converting, and validating data structures by extracting field names, tags, and values from Go objects.

What are the main features of fatih/structs?

The main features of fatih/structs are: Struct-to-Map Converters, Go Struct Reflection Utilities, Field Inspection Utilities, Go Data Mapping Libraries, Recursive Pointer Unwrapping, Runtime Type Validation, Struct Metadata Extractors, Struct Type Identification.

What are some open-source alternatives to fatih/structs?

Open-source alternatives to fatih/structs include: goccy/go-yaml — This library is a Go-based utility for encoding and decoding YAML data into native language structures. It facilitates… jinzhu/copier — Copier is a Go library that deep copies data between structs, maps, and slices using reflection-based field mapping… toml-lang/toml — TOML is a configuration file format designed for human readability and unambiguous mapping to hash tables. It serves… facebook/prop-types — prop-types is a JavaScript object validator and runtime type checker. It serves as a development tool for verifying… arktypeio/arktype — Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with… antonmedv/expr — Expr is a high-performance expression evaluation engine and language for Go applications. It functions as a dynamic…