{"id":7075,"date":"2019-06-18T09:05:58","date_gmt":"2019-06-18T16:05:58","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=7075"},"modified":"2025-06-13T21:20:29","modified_gmt":"2025-06-14T04:20:29","slug":"introducing-couchbase-go-sdk-2-0-alpha","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/","title":{"rendered":"Introducing Couchbase Go SDK 2.0 Alpha"},"content":{"rendered":"<p>I&#8217;m pleased to announce the Couchbase Go SDK 2.0 Alpha. This new SDK brings in a series of changes across all of the Couchbase SDKs that the team has been putting together. The new SDKs bring a completely new API which is simpler, future proof and integrates with the latest ecosystem developments.<\/p>\n<p>Version 2.0 of the Go SDK aligns with new features to Couchbase Server that extend off of the traditional Bucket interface: support for Scopes and Collection. Additionally, it consolidates and refines the interface &#8211; improving cross-SDK conformance.<\/p>\n<h2>New Couchbase Server Features: Scopes and Collections<\/h2>\n<p>In previous Couchbase Server versions Buckets were used as logical, user-named entities that group items. This allowed them to be accessed, indexed, replicated, and access-controlled. This was really the only means of achieving multi-tenancy using Couchbase Server and came with some limitations: Buckets themselves are fairly resource intensive and a cluster can only efficiently manage a finite number of buckets. For modern micro-service architectures, or really any architecture where multi-tenancy was needed, this made for some challenges when serving a large amount of tenants. This is solved in a future version of Couchbase Server by the concepts of Scopes and Collections.<\/p>\n<p>A Scope represents a unit of multi tenancy and is built of Collections. A Collection is effectively a unique name for a group of documents. Within a Scope a Collection name must be unique, but the same Collection name can be used across multiple Scopes. Every Bucket contains a default Scope with the name \u201c_default\u201d with an identifier of 0 (zero) which contains a default Collection named \u201c_default\u201d with its accompanying identifier of 0 (zero).<\/p>\n<p>This has the effect of moving Key\/Value operations which were in the Bucket context for SDK 1.0 into the Collection context for SDK 2.0. Cross Bucket operations such as Search, Analytics and N1QL are now done at the Cluster level.<\/p>\n<p>Couchbase Server 6.5 will support Scopes and Collections as a part of &#8220;Developer Preview&#8221;, Developer Preview is <em>not<\/em>\u00a0supported for use in production. In the meantime, SDK 2.0 also supports Couchbase 5.0 and higher by using the default Scope and Collection.<\/p>\n<h2>Highlights of the SDK 2.0 API<\/h2>\n<p>The focus on this alpha is to provide the API to use Couchbase Server with Key\/Value operations, N1QL, search, and analytics queries, as well as views. It contains the familiar Cluster and Bucket logical structures as well as the new Scope and Collections structures. Highlights can be grouped into two sections. The first is the new API which has been revamped across all SDKs to provide simpler, more future proof access patterns. The second is Go SDK specific enhancements.<\/p>\n<h3>Key Value API Improvements<\/h3>\n<p>The API has been significantly slimmed down and reworked so that the individual method calls are easier to find and more uniform. For Go this means we no longer need to have multiple calls for similar, but different, functions. We&#8217;ve also slimmed down the number of parameters required in some functions.<\/p>\n<p>For example, in SDK 1.0 there were method signatures like:<\/p>\n<pre class=\"\">func (b *Bucket) Insert(key string, value interface{}, expiry uint32) (Cas, error)\r\nfunc (b *Bucket) InsertDura(key string, value interface{}, expiry uint32, replicateTo, persistTo uint) (Cas, error)\r\nfunc (b *Bucket) Get(key string, valuePtr interface{}) (Cas, error)\r\n<\/pre>\n<p>In SDK 2.0 this has changed to:<\/p>\n<pre class=\"lang:go decode:true\">func (c *Collection) Insert(key string, val interface{}, opts *InsertOptions) (*MutationResult, error)\r\nfunc (c *Collection) Get(key string, opts *GetOptions) (*GetResult, error)<\/pre>\n<p>Each method returns a <span class=\"lang:default decode:true crayon-inline \">*Result<\/span> and has an optional parameter called <span class=\"lang:default decode:true crayon-inline\">*Options<\/span>. Anything required for an operation to work is a parameter and optional properties (like the timeout, the durability requirements, the cas value etc&#8230;) have all been moved into options blocks. This has lead to fewer &#8220;overloaded&#8221; functions and a simpler overall API. Mutation type operation results contain things like CAS values and Mutation Token. For Fetch type operations the results contain ways to get your value and document expiration (if requested).<\/p>\n<p>Options block are structs that look like:<\/p>\n<pre class=\"lang:go decode:true \">type InsertOptions struct {\r\n\tParentSpanContext opentracing.SpanContext\r\n\tTimeout           time.Duration\r\n\tContext           context.Context\r\n\t\/\/ The expiration length in seconds\r\n\tExpiration      uint32\r\n\tPersistTo       uint\r\n\tReplicateTo     uint\r\n\tDurabilityLevel DurabilityLevel\r\n\tEncoder         Encode\r\n}<\/pre>\n<p>This provides much more flexibility at an operation level than the previous API. This means that previously if you wanted to do an insert with <span class=\"lang:default decode:true crayon-inline \">persist to<\/span>\u00a0 set then you had to do <span class=\"lang:default decode:true crayon-inline \">InsertDura(&#8220;key&#8221;, &#8220;value&#8221;, 0, 0, 1)<\/span> , now it&#8217;s just <span class=\"lang:default decode:true crayon-inline \">Insert(&#8220;key&#8221;, &#8220;value&#8221;, &amp;InsertOptions{PersistTo: 1})<\/span>\u00a0.<\/p>\n<p>We now have support for <span class=\"lang:default decode:true crayon-inline \">context.Context<\/span> for cancellation. What this means is that you can use things like take the context from your HTTP handler and supply it straight into your gocb operation, so you have the same cancellation structure used throughout your HTTP request handler. If you don&#8217;t want to use <span class=\"lang:default decode:true crayon-inline \">Context<\/span> for timeouts then don&#8217;t worry, you can just use the <span class=\"lang:default decode:true crayon-inline \">Timeout<\/span>\u00a0 option instead.<\/p>\n<h3>Query API Improvements<\/h3>\n<p>The query APIs, much like the Key Value API, now use\u00a0<span class=\"lang:default decode:true crayon-inline \">*Options<\/span> blocks for optional query properties. Previously the APIs looked like:<\/p>\n<pre class=\"lang:go decode:true \">func (c *Cluster) ExecuteN1qlQuery(q *N1qlQuery, params interface{}) (QueryResults, error)\r\nfunc (c *Cluster) ExecuteAnalyticsQuery(q *AnalyticsQuery, params interface{}) (AnalyticsResults, error)\r\nfunc (c *Cluster) ExecuteSearchQuery(q *SearchQuery) (SearchResults, error)\r\nfunc (b *Bucket) ViewQuery(designDoc string, viewName string, opts *ViewOptions) (*ViewResults, error)<\/pre>\n<p>It now looks like:<\/p>\n<pre class=\"lang:go decode:true \">func (c *Cluster) Query(statement string, opts *QueryOptions) (*QueryResults, error)\r\nfunc (c *Cluster) AnalyticsQuery(statement string, opts *AnalyticsQueryOptions) (*AnalyticsResults, error)\r\nfunc (c *Cluster) SearchQuery(q SearchQuery, opts *SearchQueryOptions) (*SearchResults, error)\r\nfunc (b *Bucket) ViewQuery(designDoc string, viewName string, opts *ViewOptions) (*ViewResults, error)<\/pre>\n<p>The options blocks for these are too big to include here but they look, and work, similar to the Key Value example above. We&#8217;ve also improved API consistency across the query services by updating how results are accessed. We&#8217;re still working on custom transcoding of these results. All of the services now also use streaming to retrieve the results under the hood, this means that you can query for huge datasets without having to worry about running out of memory.<\/p>\n<h3>Error Handling Improvements<\/h3>\n<p>Previously, we exposed sentinel errors (e.g. <span class=\"lang:default decode:true crayon-inline \">if err == gocb.ErrKeyNotFound<\/span> ) that you had to match against if your operation returned an error and you had specific error types that you needed to handle. We&#8217;ve changed this, we now expose errors as types and also provide helper functions for categorising errors. You can now do <span class=\"lang:default decode:true crayon-inline\">if gocb.IsKeyNotFound(err)<\/span>, or type assert the entire error <span class=\"lang:default decode:true crayon-inline \">kvErr := err.(gocb.KeyValueError)<\/span>\u00a0 and get access to underlying context about the error if you need that too.<\/p>\n<h2>Getting Started<\/h2>\n<p>You can start using all of these enhancements by doing: <span class=\"lang:default decode:true crayon-inline \">go get github.com\/couchbase\/gocb@v2.0.0-alpha.3<\/span><\/p>\n<p>Once you have the SDK then you can connect to a cluster, open a bucket and use the default collection. For now, unless you use the Developer Preview mode in Couchbase Server 6.5 then you&#8217;ll only be able use the default collection.<\/p>\n<pre class=\"lang:go decode:true\">cluster, err := gocb.Connect(\"localhost\", gocb.ClusterOptions{Authenticator: gocb.PasswordAuthenticator{\r\n  Username: \"username\",\r\n  Password: \"password\",\r\n}})\r\nif err != nil {\r\n  panic(\"error connecting to cluster:\" + err.Error())\r\n}\r\nbucket := cluster.Bucket(\"bucket-name\", nil)\r\ncollection := bucket.DefaultCollection(nil)\r\n\r\n\/\/ Now you can perform operations:\r\n\r\nupsertResult, err := collection.Upsert(\"somekey\", \"somevalue\", &amp;gocb.UpsertOptions{Timeout: 10*time.Millisecond})\r\nif err != nil {\r\n  panic(err)\r\n}\r\n\r\nfmt.Println(upsertResult.Cas())\r\n\r\ngetResult, err := collection.Get(\"somekey\", nil)\r\nif err != nil {\r\n  panic(err)\r\n}\r\n\r\nvar myValue string\r\nerr = getResult.Content(&amp;myValue)\r\nif err != nil {\r\n  panic(err)\r\n}\r\n\r\nctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)\r\ndefer cancel()\r\nresults, err := cluster.Query(\"SELECT `bucket-name`.* from `bucket-name` LIMIT 10\", &amp;gocb.QueryOptions{\r\n\tContext: ctx,\r\n})\r\nif err != nil {\r\n  panic(err)\r\n}\r\nvar myQueryValue interface{}\r\nfor results.Next(&amp;myQueryValue) {\r\n}\r\n\r\nerr = results.Close() \r\nif err != nil { \r\n  panic(err) \r\n}\r\n<\/pre>\n<p>Note that bucket open no longer returns an error, although this is still where connecting occurs. Instead, we defer returning errors until the first operation. In the future you will be able to check the health of the bucket connection before performing operations.<\/p>\n<p>If you want to learn more, please take a look into our new\u00a0<a href=\"https:\/\/docs.couchbase.com\/go-sdk\/2.0\/hello-world\/start-using-sdk.html\" rel=\"nofollow\">documentation<\/a>\u00a0which is starting to come together as well.<\/p>\n<p>The API is pretty new, and alpha, so is still subject to change &#8211; although it shouldn&#8217;t change drastically. We&#8217;d really appreciate all feedback and bug reports to make this the best SDK we have ever delivered. This is your chance to help shape the future of the Couchbase Go SDK.<\/p>\n<h2>How do we version?<\/h2>\n<p>All SDKs subscribe to the Semantic Versioning 2.0.0 Specification (SemVer) where for any given version number <span class=\"lang:default decode:true crayon-inline\">MAJOR.MINOR.PATCH<\/span>, the version is incremented when:<\/p>\n<p>MAJOR version when you make incompatible API changes,<\/p>\n<p>MINOR version when you add functionality in a backwards-compatible manner, and<\/p>\n<p>PATCH version when you make backwards-compatible bug fixes.<\/p>\n<p>Additionally, for pre-releases and build metadata we add extensions to the SemVer Specification as allowed by it. For example, our early drops of SDK 2.0 use the alpha designation plus an increment for the alpha version. For example, our initial SDK 2.0 early previews used the following SemVer compliant version: <span class=\"lang:default decode:true crayon-inline \">2.0.0-alpha.1<\/span> . The next pre-release after the alpha releases will be <span class=\"lang:default decode:true crayon-inline \">2.0.0-beta.1<\/span> . Finally, a fully supported GA release will be <span class=\"lang:default decode:true crayon-inline \">2.0.0<\/span> . In general, expect breaking changes between alpha versions. Breaking changes should not happen (but in some cases may be necessary) once beta is released.<\/p>\n<p>&nbsp;<\/p>\n<p>Cover image by Maria Letta as a part of the\u00a0<a href=\"https:\/\/github.com\/MariaLetta\/free-gophers-pack\/\">free gophers pack.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m pleased to announce the Couchbase Go SDK 2.0 Alpha. This new SDK brings in a series of changes across all of the Couchbase SDKs that the team has been putting together. The new SDKs bring a completely new API [&hellip;]<\/p>\n","protected":false},"author":17480,"featured_media":7091,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1820,2201],"tags":[2364],"ppma_author":[8944],"class_list":["post-7075","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-golang","category-tools-sdks","tag-collections"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.7.1 (Yoast SEO v25.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Introducing Couchbase Go SDK 2.0 Alpha - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Check out the new Couchbase Go SDK Alpha and find out what we&#039;re changing in this latest major release.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing Couchbase Go SDK 2.0 Alpha\" \/>\n<meta property=\"og:description\" content=\"Check out the new Couchbase Go SDK Alpha and find out what we&#039;re changing in this latest major release.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-18T16:05:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T04:20:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png\" \/>\n\t<meta property=\"og:image:width\" content=\"666\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Charles Dixon, Software Engineer, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Charles Dixon, Software Engineer, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/\"},\"author\":{\"name\":\"Charles Dixon, Senior Software Engineer, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/cd440eed5f00a0f702828c9f3697f6c3\"},\"headline\":\"Introducing Couchbase Go SDK 2.0 Alpha\",\"datePublished\":\"2019-06-18T16:05:58+00:00\",\"dateModified\":\"2025-06-14T04:20:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/\"},\"wordCount\":1251,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png\",\"keywords\":[\"collections\"],\"articleSection\":[\"GoLang\",\"Tools &amp; SDKs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/\",\"name\":\"Introducing Couchbase Go SDK 2.0 Alpha - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png\",\"datePublished\":\"2019-06-18T16:05:58+00:00\",\"dateModified\":\"2025-06-14T04:20:29+00:00\",\"description\":\"Check out the new Couchbase Go SDK Alpha and find out what we're changing in this latest major release.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png\",\"width\":666,\"height\":512,\"caption\":\"Image by Maria Letta as a part of the\u00a0free gophers pack - https:\/\/github.com\/MariaLetta\/free-gophers-pack\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing Couchbase Go SDK 2.0 Alpha\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/cd440eed5f00a0f702828c9f3697f6c3\",\"name\":\"Charles Dixon, Senior Software Engineer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9cb6d8cbb9125a775db01b9a74258c36\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6359fe0ffc778647ed89c818c1474ac1151dae1fe4bf7315ad38a0ec92cfe9af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6359fe0ffc778647ed89c818c1474ac1151dae1fe4bf7315ad38a0ec92cfe9af?s=96&d=mm&r=g\",\"caption\":\"Charles Dixon, Senior Software Engineer, Couchbase\"},\"description\":\"Charles Dixon is a Senior Software Engineer at Couchbase. He primarily works on the Couchbase Go SDK.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/charles-dixon\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introducing Couchbase Go SDK 2.0 Alpha - The Couchbase Blog","description":"Check out the new Couchbase Go SDK Alpha and find out what we're changing in this latest major release.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/","og_locale":"en_US","og_type":"article","og_title":"Introducing Couchbase Go SDK 2.0 Alpha","og_description":"Check out the new Couchbase Go SDK Alpha and find out what we're changing in this latest major release.","og_url":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/","og_site_name":"The Couchbase Blog","article_published_time":"2019-06-18T16:05:58+00:00","article_modified_time":"2025-06-14T04:20:29+00:00","og_image":[{"width":666,"height":512,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png","type":"image\/png"}],"author":"Charles Dixon, Software Engineer, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Charles Dixon, Software Engineer, Couchbase","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/"},"author":{"name":"Charles Dixon, Senior Software Engineer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/cd440eed5f00a0f702828c9f3697f6c3"},"headline":"Introducing Couchbase Go SDK 2.0 Alpha","datePublished":"2019-06-18T16:05:58+00:00","dateModified":"2025-06-14T04:20:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/"},"wordCount":1251,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png","keywords":["collections"],"articleSection":["GoLang","Tools &amp; SDKs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/","url":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/","name":"Introducing Couchbase Go SDK 2.0 Alpha - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png","datePublished":"2019-06-18T16:05:58+00:00","dateModified":"2025-06-14T04:20:29+00:00","description":"Check out the new Couchbase Go SDK Alpha and find out what we're changing in this latest major release.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/06\/go_sdk_200_alpha-e1560873888608.png","width":666,"height":512,"caption":"Image by Maria Letta as a part of the\u00a0free gophers pack - https:\/\/github.com\/MariaLetta\/free-gophers-pack"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/introducing-couchbase-go-sdk-2-0-alpha\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Introducing Couchbase Go SDK 2.0 Alpha"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/cd440eed5f00a0f702828c9f3697f6c3","name":"Charles Dixon, Senior Software Engineer, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9cb6d8cbb9125a775db01b9a74258c36","url":"https:\/\/secure.gravatar.com\/avatar\/6359fe0ffc778647ed89c818c1474ac1151dae1fe4bf7315ad38a0ec92cfe9af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6359fe0ffc778647ed89c818c1474ac1151dae1fe4bf7315ad38a0ec92cfe9af?s=96&d=mm&r=g","caption":"Charles Dixon, Senior Software Engineer, Couchbase"},"description":"Charles Dixon is a Senior Software Engineer at Couchbase. He primarily works on the Couchbase Go SDK.","url":"https:\/\/www.couchbase.com\/blog\/author\/charles-dixon\/"}]}},"authors":[{"term_id":8944,"user_id":17480,"is_guest":0,"slug":"charles-dixon","display_name":"Charles Dixon, Software Engineer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/6359fe0ffc778647ed89c818c1474ac1151dae1fe4bf7315ad38a0ec92cfe9af?s=96&d=mm&r=g","author_category":"","last_name":"Dixon, Software Engineer, Couchbase","first_name":"Charles","job_title":"","user_url":"","description":"Charles Dixon is Software Engineer at Couchbase. He works on the Couchbase Go SDK."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/7075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/17480"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=7075"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/7075\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/7091"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=7075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=7075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=7075"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=7075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}