Sample code for 30+ languages & platforms
Go

Transition from Cert.GetValidToDt to Cert.ValidToStr

Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.

Chilkat Go Downloads

Go
    cert := chilkat.NewCert()

    // ------------------------------------------------------------------------
    // The GetValidToDt method is deprecated:

    ckdt1 := cert.GetValidToDt()
    if cert.LastMethodSuccess() == false {
        fmt.Println(cert.LastErrorText())
        cert.DisposeCert()
        return
    }

    // ...
    // ...

    ckdt1.DisposeCkDateTime()

    // ------------------------------------------------------------------------
    // Do the equivalent using the ValidToStr property

    ckdt2 := chilkat.NewCkDateTime()
    ckdt2.SetFromRfc822(cert.ValidToStr())

    cert.DisposeCert()
    ckdt2.DisposeCkDateTime()