]> Cypherpunks repositories - gostls13.git/commit
reflect: add method StructTag.Lookup
authorJohn Jeffery <jjeffery@sp.com.au>
Sun, 20 Mar 2016 10:24:12 +0000 (20:24 +1000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 25 Mar 2016 04:54:19 +0000 (04:54 +0000)
commit5c8674a497724f509737a3523e7c2ddf94e3a72b
tree31bb815ce1beff55f7184db7690d0e901f8c99f3
parent139fad21b937dc0b405d243e3abe33429890947f
reflect: add method StructTag.Lookup

The Lookup method provides a way to extract a tag value, while
determining whether the tag key exists in the struct field's tag.

Fixes #14883

Change-Id: I7460cb68f0ca1aaa025935050b9e182efcb64db3
Reviewed-on: https://go-review.googlesource.com/20864
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/reflect/example_test.go
src/reflect/type.go