Go
Go
Transition from Email.Clone to Email.MakeCopy
Provides instructions for replacing deprecated Clone method calls with MakeCopy.Chilkat Go Downloads
success := false
email := chilkat.NewEmail()
// ...
// ...
// ------------------------------------------------------------------------
// The Clone method is deprecated:
emailObj := email.Clone()
if email.LastMethodSuccess() == false {
fmt.Println(email.LastErrorText())
email.DisposeEmail()
return
}
// ...
// ...
emailObj.DisposeEmail()
// ------------------------------------------------------------------------
// Do the equivalent using MakeCopy.
// Your application creates a new, empty Email object which is passed
// in the last argument and filled upon success.
emailOut := chilkat.NewEmail()
success = email.MakeCopy(emailOut)
if success == false {
fmt.Println(email.LastErrorText())
email.DisposeEmail()
emailOut.DisposeEmail()
return
}
email.DisposeEmail()
emailOut.DisposeEmail()