readme: add example about field fields

This commit is contained in:
Fatih Arslan 2014-08-17 20:32:57 +03:00
parent db46c5303b
commit ebbcf66cbe

View File

@ -127,6 +127,9 @@ addrField := s.Field("Server").Field("Addr")
// Get the value for addr
a := addrField.Value().(string)
// Or get all fields
httpServer := s.Field("Server").Fields()
```
We can also get a slice of Fields from the Struct type to iterate over all