From 12ff68a6f48a1c8bd118316171545683337655df Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Wed, 24 Feb 2016 10:23:52 +0200 Subject: [PATCH] README.md: make example better --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 752ba57..44e0100 100644 --- a/README.md +++ b/README.md @@ -141,10 +141,9 @@ We can also get a slice of Fields from the Struct type to iterate over all fields. This is handy if you wish to examine all fields: ```go -// Convert the fields of a struct to a []*Field -fields := s.Fields() +s := structs.New(server) -for _, f := range fields { +for _, f := range s.Fields() { fmt.Printf("field name: %+v\n", f.Name()) if f.IsExported() {