Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-17

Unexpected legacy flags value while using b.Get

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.2.0
    • 0.1.0
    • library
    • None

    Description

      type TcgPrice struct

      { XMLName xml.Name `xml:"products" json:"-"` Id int `xml:"product>id" json:"id"` HiPrice float64 `xml:"product>hiprice" json:"hi_price"` LowPrice float64 `xml:"product>lowprice" json:"low_price"` AvgPrice float64 `xml:"product>avgprice" json:"avg_price"` FoilAvgPrice float64 `xml:"product>foilavgprice" json:"foil_avg_price"` Demo string `json:"demo"` }

      func (m *Card) GetPrices(b *gocouchbase.Bucket) (price *TcgPrice, err error) {
      key := fmt.Sprintf("%s-tcgprice", m.ID)
      if _, _, err = b.Get(key, &price); err == nil

      { return }

      // TODO: change me to ErrStatusNotFound when
      // Bret relesase the fix for gocouchbaseio
      switch err.Error() {
      case "Key not found.":
      price = &TcgPrice

      {Demo: "test string"}

      _, err = b.Insert(key, price, uint32(60*60*2))
      return
      }

      return
      }

      This sample function I wrote to get a cached object or populate it, is erroring out on bucket.Get and I don't see any reason why.

      The bucket type is Couchbase (not memcahe)

      "Unexpected legacy flags value"

      Thank you

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              brett19 Brett Lawson
              styles styles
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty