code: func sysToCredential(cred *sysCREDENTIAL) (result *Credential) {
  	if cred == nil {
  		return nil
  	}
  	result = new(Credential)
  	result.Comment = utf16PtrToString(cred.Comment)
  	result.TargetName = utf16PtrToString(cred.TargetName)
  	result.TargetAlias = utf16PtrToString(cred.TargetAlias)
  	result.UserName = utf16PtrToString(cred.UserName)
  	result.LastWritten = time.Unix(0, cred.LastWritten.Nanoseconds())
  	result.Persist = CredentialPersistence(cred.Persist)
  	result.CredentialBlob = goBytes(cred.CredentialBlob, cred.CredentialBlobSize)
  	result.Attributes = make([]CredentialAttribute, cred.AttributeCount)
  	attrSlice := *(*[]sysCREDENTIAL_ATTRIBUTE)(unsafe.Pointer(&reflect.SliceHeader{
  		Data: cred.Attributes,
  		Len:  int(cred.AttributeCount),
  		Cap:  int(cred.AttributeCount),
  	}))
  	for i, attr := range attrSlice {
  		resultAttr := &result.Attributes[i]
  		resultAttr.Keyword = utf16PtrToString(attr.Keyword)
  		resultAttr.Value = goBytes(attr.Value, attr.ValueSize)
  	}
  	return result
  }
docs: // Convert the given CREDENTIAL struct to a more usable structure