Sample code for 30+ languages & platforms
Go

Transition from Cert.GetValidFromDt to Cert.ValidFromStr

Provides instructions for replacing deprecated GetValidFromDt method calls with ValidFromStr.

Chilkat Go Downloads

Go
    cert := chilkat.NewCert()

    // ------------------------------------------------------------------------
    // The GetValidFromDt method is deprecated:

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

    // ...
    // ...

    ckdt1.DisposeCkDateTime()

    // ------------------------------------------------------------------------
    // Do the equivalent using the ValidFromStr property

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

    cert.DisposeCert()
    ckdt2.DisposeCkDateTime()