Documentation
¶
Overview ¶
Package spannertag exports the Cloud Spanner Go client library's `spanner` struct tag parser for use with the fields cache, so third-party libraries can list struct fields with the exact semantics of cloud.google.com/go/spanner.Row.ToStruct and the *Struct mutation constructors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Cache is a shared fields.Cache built on Parser, the exported counterpart of the client's fieldCache.
Functions ¶
func Parser ¶
Parser parses the `spanner` struct tag: `spanner:"-"` drops the field; `spanner:"->"` marks it read-only keeping the Go field name; otherwise the tag splits on ";" with the column name first and `->` or case-insensitive `readonly` parts marking the field read-only. It satisfies the parseTag contract of fields.NewCache.