Repository: apigee/registry (go)

Issue:
Registry tool: `registry config configurations create` creates configurations with an empty location
After running `registry config configurations create local` in a new environment and configuring my server address and project, I noticed that `registry get apis` returned this error:

```
$ registry get apis
Error: unsupported pattern apis
Usage:
  registry get PATTERN [flags]

Flags:
      --filter string   filter selected resources
  -h, --help            help for get
      --nested          include nested subresources in YAML output
  -o, --output string   output type (name|yaml|contents) (default "name")

Global Flags:
      --address string             the server and port of the Registry API (eg. localhost:8080)
  -c, --config string              name of a configuration profile or path to config file
      --registry.address string    the server and port of the Registry API (eg. localhost:8080)
      --registry.insecure          if specified, client connects via http (not https)
      --registry.location string   the API Registry location
      --registry.project string    the API Registry project
      --registry.token string      the token to use for authorization to the API Registry

----
Need more help?
https://github.com/apigee/registry/wiki
```

`registry config set location global` fixes this, but since we are always using this value for location, could we make that the default?

(`insecure` is also a tripping point, maybe we should automatically set that whenever the address is set to localhost... or could we suggest fixing this setting when calls fail?)

Pull request:
Use "global" as the default location when location is unspecified (i.e. empty).
Fixes #1105.

Patch:
diff --git a/pkg/connection/config.go b/pkg/connection/config.go
index 3887dd1..7532b30 100644
--- a/pkg/connection/config.go
+++ b/pkg/connection/config.go
@@ -84,6 +84,9 @@ func (c Config) FQName(name string) string {
 			name = path.Join("projects", c.Project, name)
 		} else if c.Location != "" {
 			name = path.Join("projects", c.Project, "locations", c.Location, name)
+		} else {
+			// Use "global" as the default location.
+			name = path.Join("projects", c.Project, "locations", "global", name)
 		}
 	}
 	return name


Test patch:
diff --git a/pkg/connection/config_test.go b/pkg/connection/config_test.go
index 6aa130f..4871257 100644
--- a/pkg/connection/config_test.go
+++ b/pkg/connection/config_test.go
@@ -44,6 +44,30 @@ func TestFQNamePartialConfig(t *testing.T) {
 	}
 }
 
+func TestFQNameUnspecifiedLocation(t *testing.T) {
+	data := []struct {
+		input string
+		want  string
+	}{
+		{"locations/foo", "projects/project1/locations/foo"},
+		{"/locations/foo", "projects/project1/locations/foo"},
+		{"apis/foo", "projects/project1/locations/global/apis/foo"},
+		{"/apis/foo", "projects/project1/locations/global/apis/foo"},
+	}
+
+	c := Config{
+		Project: "project1",
+	}
+	for _, d := range data {
+		t.Run(d.input, func(t *testing.T) {
+			got := c.FQName(d.input)
+			if d.want != got {
+				t.Errorf("want: %q, got: %q", d.want, got)
+			}
+		})
+	}
+}
+
 func TestFQNameFullConfig(t *testing.T) {
 	data := []struct {
 		input string