Go SDK How to Creating a design documents?

couchbase version:4.0
GO SDK:1.0
couchbase number:one

JAVA SDK Creating design documents ,As follows:
CouchbaseCluster cluster = CouchbaseCluster.create(“”);
Bucket bucket = cluster.openBucket(“mytest”);
// Get bucket manager
BucketManager bucketManager = bucket.bucketManager();

// Initialize design document
DesignDocument designDoc = DesignDocument.create(
“function (doc, meta) { if (doc.timestamp >= 1448603514 && doc.timestamp <= 1448615436 ) {emit([doc.endpoint, doc.metric], [doc.value,doc.timestamp]);}}”))

// Insert design document into the bucket

1.Go SDK No create function?Can initialize design document?example?
2.Map function “1448603514” and “1448615436” it can be a variable? example?

Many thanks for your help.

Hey @lindan,

You can access the same BucketManager you see in the Java SDK by using the Manager() function of the Bucket class. You can take a look here for more information:

Cheers, Brett

Thank you very much.