Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ungerik/pkgreflect
A Go preprocessor for package scoped reflection
https://github.com/ungerik/pkgreflect
Last synced: 3 months ago
JSON representation
A Go preprocessor for package scoped reflection
- Host: GitHub
- URL: https://github.com/ungerik/pkgreflect
- Owner: ungerik
- License: mit
- Created: 2012-09-03T07:53:00.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-09-05T12:27:27.000Z (almost 7 years ago)
- Last Synced: 2024-01-08T01:06:01.437Z (5 months ago)
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 105
- Watchers: 7
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- fucking-awesome-go - :octocat: pkgreflect - A Go preprocessor for package scoped reflection. :star: 32 :fork_and_knife: 5 (Generation & Generics / Advanced Console UIs)
- awesome-go-projects - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Standard CLI)
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - | - | - | (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - A Go preprocessor for package scoped reflection. (Generation & Generics / Advanced Console UIs)
- awesome-go-with-framework - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - A Go preprocessor for package scoped reflection. (Generation & Generics / Advanced Console UIs)
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - 执行软件包作用域反射的预处理器。 (<span id="代和泛型-generation-and-generics">代和泛型 Generation and Generics</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go. - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go-cn - pkgreflect - 用于包作用域反射的 Go 语言预处理器 (代码生成与泛型 / 高级控制台界面)
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-Char - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-reader - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go-cn - pkgreflect
- awesome-go - pkgreflect - A Go preprocessor for package scoped reflection. (Generation & Generics / Advanced Console UIs)
- awesome-go-handwritten - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - 用於包作用域反射的 Go 語言預處理器 (代碼生成與泛型 / 高級控制台界面)
- awesome-go2 - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - A Go preprocessor for package scoped reflection. (Generation & Generics / Advanced Console UIs)
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. - :arrow_down:0 - :star:39 (Generation and Generics / Advanced Console UIs)
- awesome-go - pkgreflect - Go preprocessor for package scoped reflection. (Generation and Generics / Advanced Console UIs)
- awesome-go-cn - pkgreflect
- awesome-go-cn - pkgreflect
- awesome-go - pkgreflect - A Go preprocessor for package scoped reflection - ★ 71 (Generation and Generics)
- go-awesome-cn-star - pkgreflect
README
## pkgreflect - A Go preprocessor for package scoped reflection
Problem: Go reflection does not support enumerating types, variables and functions of packages.
pkgreflect generates a file named pkgreflect.go in every parsed package directory.
This file contains the following maps of exported names to reflection types/values:var Types = map[string]reflect.Type{ ... }
var Functions = map[string]reflect.Value{ ... }
var Variables = map[string]reflect.Value{ ... }
var Consts = map[string]reflect.Value{ ... }Command line usage:
pkgreflect --help
pkgreflect [-notypes][-nofuncs][-novars][-noconsts][-unexported][-norecurs][-gofile=filename.go] [DIR_NAME]If -norecurs is not set, then pkgreflect traverses recursively into sub-directories.
If no DIR_NAME is given, then the current directory is used as root.