FAQ
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 follwing 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{ ... }

Command line usage:

pkgreflect --help
pkgreflect
[-notypes][-nofuncs][-novars][-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.

Source:
https://github.com/ungerik/pkgreflect

Search Discussions

  • Jan Mercl at Sep 3, 2012 at 2:24 pm

    On Mon, Sep 3, 2012 at 3:51 PM, Erik Unger wrote:
    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 follwing 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{ ... }
    What's wrong with smartlinking???

    -j

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 3, '12 at 1:51p
activeSep 3, '12 at 2:24p
posts2
users2
websitegolang.org

2 users in discussion

Jan Mercl: 1 post Erik Unger: 1 post

People

Translate

site design / logo © 2021 Grokbase