Use a strong type for UID fields

This commit is contained in:
Tim Hockin
2015-01-14 13:53:43 -08:00
parent 4e539001df
commit e86d4cd3c6
31 changed files with 182 additions and 170 deletions

View File

@@ -23,7 +23,7 @@ import (
// FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta.
func FillObjectMetaSystemFields(ctx Context, meta *ObjectMeta) {
meta.CreationTimestamp = util.Now()
meta.UID = util.NewUUID().String()
meta.UID = util.NewUUID()
}
// HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values.