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])
  }

 

posted on 2017-07-19 20:50  iokde.com  阅读(642)  评论(0编辑  收藏  举报

导航