func (db *DB) Rev(ctx context.Context, docID string) (rev string, err error) {
	if r, ok := db.driverDB.(driver.Rever); ok {
		return r.Rev(ctx, docID)
	}
	// These last two lines cannot be combined for GopherJS due to a bug.
	// See https://github.com/gopherjs/gopherjs/issues/608
	row, err := db.Get(ctx, docID, nil)
	if err != nil {
		return "", err
	}
	var doc struct {
		Rev string `json:"_rev"`
	}
	if err = row.ScanDoc(&doc); err != nil {
		return "", err
	}
	return doc.Rev, nil
}
// Rev returns the most current rev of the requested document. This can
// be more efficient than a full document fetch, because only the rev is
// fetched from the server.
Rev returns the most current rev of the requested document. This can
be more efficient than a full document fetch, because only the rev is
fetched from the server.
// Rev returns the most current rev of the requested document . This can // be more efficient than a full document fetch because only the rev is // fetched from the server .
func (db *DB) Rev(ctx context.Context, docID string) (rev string, err error) {
	if r, ok := db.driverDB.(driver.Rever); ok {
		return r.Rev(ctx, docID)
	}
	row, err := db.Get(ctx, docID, nil)
	if err != nil {
		return "", err
	}
	var doc struct {
		Rev string `json:"_rev"`
	}
	if err = row.ScanDoc(&doc); err != nil {
		return "", err
	}
	return doc.Rev, nil
}
func ( db * DB ) Rev ( ctx context . Context , docID string ) ( rev string , err error ) { if r , ok := db . driverDB . ( driver . Rever ) ; ok { return r . Rev ( ctx , docID ) } row , err := db . Get ( ctx , docID , nil ) if err != nil { return " " , err } var doc struct { Rev string `json:"_rev"` } if err = row . ScanDoc ( & doc ) ; err != nil { return " " , err } return doc . Rev , nil }
Rev returns the most current rev of the requested document.
Rev returns the most current rev of the requested document .
// These last two lines cannot be combined for GopherJS due to a bug. // See https://github.com/gopherjs/gopherjs/issues/608