Browse Source

Tweaks FromTime documentation to match conventions

Also adds me to AUTHORS
Pete Hopkins 12 years ago
parent
commit
e00bbf254f
2 changed files with 4 additions and 2 deletions
  1. 1 0
      AUTHORS
  2. 3 2
      uuid/uuid.go

+ 1 - 0
AUTHORS

@@ -11,3 +11,4 @@ Ghais Issa <ghais.issa@gmail.com>
 Sasha Klizhentas <klizhentas@gmail.com>
 Konstantin Cherkasov <k.cherkasoff@gmail.com>
 Ben Hood <0x6e6562@gmail.com>
+Pete Hopkins <phopkins@gmail.com>

+ 3 - 2
uuid/uuid.go

@@ -100,14 +100,15 @@ func RandomUUID() UUID {
 
 var timeBase = time.Date(1582, time.October, 15, 0, 0, 0, 0, time.UTC).Unix()
 
-// Convenience to generate a version 1 UUID from the current time.
+// TimeUUID generates a new time based UUID (version 1) using the current
+// time as the timestamp.
 func TimeUUID() UUID {
 	return FromTime(time.Now())
 }
 
 // FromTime generates a new time based UUID (version 1) as described in RFC
 // 4122. This UUID contains the MAC address of the node that generated the
-// UUID, a timestamp and a sequence number.
+// UUID, the given timestamp and a sequence number.
 func FromTime(aTime time.Time) UUID {
 	var u UUID