Skip to content

Instantly share code, notes, and snippets.

@mpchadwick
Created November 2, 2020 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpchadwick/5b2d782a598c694561ecdc3ec61da4a0 to your computer and use it in GitHub Desktop.
Save mpchadwick/5b2d782a598c694561ecdc3ec61da4a0 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/jaswdr/faker"
"reflect"
)
func main() {
f := faker.New()
person := reflect.ValueOf(f).MethodByName("Person").Call(nil)[0].Interface().(faker.Person)
name := reflect.ValueOf(person).MethodByName("Name").Call(nil)[0]
fmt.Println(person)
fmt.Println(name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment