首页 > 代码库 > protobuf GetExtension

protobuf GetExtension

get extention values from  proto file 

 

  value, err := proto.GetExtension(imp, openrtb.E_Imp)
  if err != nil {
          logger.Info("E_imp get err ")
  }
  impExt := value.(*openrtb.ImpExt)
  if len(impExt.GetBillingId()) > 0 {
          info.billing_id = fmt.Sprint(impExt.GetBillingId()[0])
  }

 

protobuf GetExtension