/flex

Primary LanguageGoMIT LicenseMIT

(っ◔◡◔)っ ♥ Flex ♥

License Static Badge Coverage Status Go Reference Go Reference

Library for introspection of structures.

Allows you to examine the structure of objects (including private fields) at runtime.

⚠️ Important

Typing SVG

This library is written for fun, and the original purpose of writing it is to better understand the go language.

✨ Functions

  • StructToMap[T any] - Getting all fields (as well as nested fields) as a map.
  • ValuesOf[Target, From any] - Search for all values matching the specified Target type.
  • FieldValue[T any] - Returning a value in a structure along a specified path.

⬇️ Install

go get github.com/hikitani/flex