Chromium Code Reviews| Index: service/rawdatastore/properties.go |
| diff --git a/service/rawdatastore/properties.go b/service/rawdatastore/properties.go |
| index f1e0341b59ce539577bd59ae536eeec678bb991b..2092a5c73057e39b514eeed871d18402f43c31ea 100644 |
| --- a/service/rawdatastore/properties.go |
| +++ b/service/rawdatastore/properties.go |
| @@ -347,6 +347,20 @@ type PropertyLoadSaver interface { |
| // val, err := helper.GetPLS(&MyStruct{10}).GetMeta("id") |
| // // val == 10 |
| // // err == nil |
| + // |
| + // Struct fields of type BoolFlag (which is an Auto/False/True) allow you to |
| + // specify a value of 'true' or 'false' for the default value of the struct |
| + // tag, and GetMeta will return the combined value as a regular boolean true |
| + // or false value. If a field is BoolFlag, and no <value> is specified, |
| + // GetMeta will return false. A simple boolean field creates ambiguity with |
| + // a default <value>. |
| + // |
| + // Example: |
| + // type MyStruct struct { |
| + // TFlag BoolFlag `gae:"$flag1,true"` // defaults to true |
|
Vadim Sh.
2015/07/24 18:53:00
update to Toggle & on\off
iannucci
2015/07/24 20:58:10
Done.
|
| + // FFlag BoolFlag `gae:"$flag2,false"` // defaults to false |
| + // Flag BoolFlag `gae:"$flag3"` // defaults to false |
| + // } |
| GetMeta(key string) (interface{}, error) |
| // SetMeta allows you to set the current value of the meta-keyed field. |