doc/ref: fix typo in spec

It's CUE not Go.
Also fix a few links with missing targets. There may be more.

Change-Id: I4dd1a6406457ef5960c7d8bd35a13d38e936bfde
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/3343
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/doc/ref/spec.md b/doc/ref/spec.md
index 11dbb14..f9f36df 100644
--- a/doc/ref/spec.md
+++ b/doc/ref/spec.md
@@ -79,7 +79,7 @@
 alternatives. The horizontal ellipsis … is also used elsewhere in the spec to
 informally denote various enumerations or code snippets that are not further
 specified. The character … (as opposed to the three characters ...) is not a
-token of the Go language.
+token of the CUE language.
 
 
 ## Source code representation
@@ -1896,7 +1896,7 @@
 
 ### Selectors
 
-For a [primary expression] `x` that is not a [package name],
+For a [primary expression](#primary-expressions) `x` that is not a [package name](#package-clause),
 the selector expression
 
 ```
@@ -1906,7 +1906,7 @@
 denotes the field `f` of the value `x`.
 The identifier `f` is called the field selector.
 The type of the selector expression is the type of `f`.
-If `x` is a package name, see the section on [qualified identifiers].
+If `x` is a package name, see the section on [qualified identifiers](#qualified-identifiers).
 
 <!--
 TODO: consider allowing this and also for selectors. It needs to be considered