Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 895 Bytes

README.md

File metadata and controls

24 lines (16 loc) · 895 Bytes

Golf Build Status Coverage Status GoDoc

Go List Fields (Golf) is a package for the Go language that makes it incredibly simple to get a list of fields from any type using the Field Output through Reflective Evaluation function, otherwise known as Fore:

type Person struct {
    Name string
}

p := &Person{"Batman"}

fields := golf.Fore("hero", p)

for k,v := range fields {
    fmt.Printf("%s=%v\n", k,v)
}

The above example will emit the following:

hero.Name=Batman

A simple example, the true power of Golf is in its configuration options.