code: func ParseMagnetLink(cdaMagnetLink string) (*CDA, error) {
  	link, err := url.Parse(cdaMagnetLink)
  	if err != nil {
  		return nil, err
  	}
  	query := link.Query()
  	cda := &CDA{}
  	if len(link.Host) != consts.AddressWithChecksumTrytesSize {
  		return nil, errors.Wrap(ErrAddressInvalid, "host/address part of magnet-link must be 90 trytes long")
  	}
  	addrWithChecksum, err := checksum.AddChecksum(link.Host[:consts.HashTrytesSize], true, consts.AddressChecksumTrytesSize)
  	if err != nil {
  		return nil, err
  	}
  	cda.Address = addrWithChecksum
  	expiresSeconds, err := strconv.ParseInt(query.Get(MagnetLinkTimeoutField), 10, 64)
  	if err != nil {
  		return nil, errors.Wrap(err, "invalid expire timestamp")
  	}
  	expire := time.Unix(expiresSeconds, 0).UTC()
  	cda.TimeoutAt = &expire
  	cda.MultiUse = query.Get(MagnetLinkMultiUseField) == "1"
  	expectedAmount, err := strconv.ParseUint(query.Get(MagnetLinkExpectedAmountField), 10, 64)
  	if err != nil {
  		return nil, errors.Wrap(err, "invalid expected amount")
  	}
  	cda.ExpectedAmount = &expectedAmount
  
  	computedChecksum, err := cda.Checksum()
  	if err != nil {
  		return nil, err
  	}
  	magnetLinkChecksum := link.Host[consts.HashTrytesSize:]
  	if computedChecksum[consts.HashTrytesSize-consts.AddressChecksumTrytesSize:consts.HashTrytesSize] != magnetLinkChecksum {
  		return nil, ErrMagnetLinkChecksumInvalid
  	}
  	if err := ValidateConditions(&cda.Conditions); err != nil {
  		return nil, err
  	}
  	return cda, nil
  }
docs: // ParseMagnetLink parses the given magnet link URL.