Update deps, and adjust usage of go-uuid to match new return values

This commit is contained in:
Jeff Mitchell
2016-01-13 13:40:08 -05:00
parent 239164733c
commit 21f91f73bb
146 changed files with 4718 additions and 5407 deletions

View File

@@ -56,11 +56,18 @@ func (b *backend) pathRoleCreateRead(
if len(displayName) > 26 {
displayName = displayName[:26]
}
username := fmt.Sprintf("%s-%s", displayName, uuid.GenerateUUID())
userUUID, err := uuid.GenerateUUID()
if err != nil {
return nil, err
}
username := fmt.Sprintf("%s-%s", displayName, userUUID)
if len(username) > 63 {
username = username[:63]
}
password := uuid.GenerateUUID()
password, err := uuid.GenerateUUID()
if err != nil {
return nil, err
}
expiration := time.Now().UTC().
Add(lease.Lease + time.Duration((float64(lease.Lease) * 0.1))).
Format("2006-01-02 15:04:05-0700")