Merge branch '16265-security-updates' into dependabot/bundler/apps/workbench/loofah...
[arvados.git] / doc / sdk / go / index.html.textile.liquid
index e4e3821e360caf1c64d525bf3a393223bd04acc3..709b0d52435c237e83eef8e6ee3ad180982a1182 100644 (file)
@@ -2,70 +2,27 @@
 layout: default
 navsection: sdk
 navmenu: Go
-title: "Go SDK"
-
+title: "Installation"
 ...
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
 
-The Go ("Golang":http://golang.org) SDK provides a generic set of wrappers so you can make API calls easily.
-
-h3. Installation
-
-You don't need to install anything. Just import the client like this. The go tools will fetch the relevant code and dependencies for you.
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
 
-<notextile>
-<pre><code class="userinput">import (
-       "git.curoverse.com/arvados.git/sdk/go/keepclient"
-       "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
-)
-</code></pre>
-</notextile>
+The Go ("Golang":http://golang.org) SDK provides a generic set of wrappers so you can make API calls easily.
 
-If you need pre-release client code, you can use the latest version from the repo by following "these instructions.":https://arvados.org/projects/arvados/wiki/Go#Using-Go-with-Arvados
+See "Arvados GoDoc":https://godoc.org/git.arvados.org/arvados.git/sdk/go for detailed documentation.
 
-h3. Examples
+h3. Installation
 
-Import the module. (We import the log module here too, so we can use it in the subsequent examples.)
+Use @go get git.arvados.org/arvados.git/sdk/go/arvadosclient@.  The go tools will fetch the relevant code and dependencies for you.
 
-<notextile>
-<pre><code class="userinput">import (
-       "git.curoverse.com/arvados.git/sdk/go/keepclient"
-       "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
-       "log"
+{% codeblock as go %}
+import (
+       "git.arvados.org/arvados.git/sdk/go/arvadosclient"
+       "git.arvados.org/arvados.git/sdk/go/keepclient"
 )
-</code></pre>
-</notextile>
-
-Set up an API client user agent:
-
-<notextile>
-<pre><code class="userinput">  arv, err := arvadosclient.MakeArvadosClient()
-       if err != nil {
-               log.Fatalf("Error setting up arvados client %s", err.Error())
-       }
-</code></pre>
-</notextile>
-
-Get the User object for the current user:
-
-<notextile>
-<pre><code class="userinput">  type user struct {
-               Uuid       string   `json:"uuid"`
-               FullName   string   `json:"full_name"`
-       }
-
-       var u user
-       err := arv.Call("GET", "users", "", "current", nil, &u)
-
-       if err != nil {
-               return err
-       }
-
-       log.Printf("Logged in as %s (uuid %s)", user.Uuid, user.FullName)
-</code></pre>
-</notextile>
-
-Print all returned fields for collections:
-
-{% code 'example_sdk_go_collection_list' as go %}
+{% endcodeblock %}
 
-A few more usage examples can be found in the services/keepproxy and sdk/go/keepclient directories in the arvados source tree.
+If you need pre-release client code, you can use the latest version from the repo by following "these instructions.":https://dev.arvados.org/projects/arvados/wiki/Go#Using-Go-with-Arvados