Set up Go modules.

This should make it easier for us to reuse Go code properly.
util/fipstools is kind of a mess. runner has been using relative
imports, but Go seems to prefer this mechanism these days.

Update-Note: The import spelling in ssl/test/runner changes. Also we now
    require Go 1.11. Or you could clone us into GOPATH, but no one does
    that.

Change-Id: I8bf91e1e0345b3d0b3d17f5c642fe78b415b7dde
Reviewed-on: https://boringssl-review.googlesource.com/31884
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/BUILDING.md b/BUILDING.md
index 9bf9cb2..ab9b71d 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -29,8 +29,9 @@
     and Clang should work on non-Windows platforms, and maybe on Windows too.
     To build the tests, you also need a C++ compiler with C++11 support.
 
-  * [Go](https://golang.org/dl/) is required. If not found by CMake, the go
-    executable may be configured explicitly by setting `GO_EXECUTABLE`.
+  * The most recent stable version of [Go](https://golang.org/dl/) is required.
+    If not found by CMake, the go executable may be configured explicitly by
+    setting `GO_EXECUTABLE`.
 
   * To build the x86 and x86\_64 assembly, your assembler must support AVX2
     instructions and MOVBE. If using GNU binutils, you must have 2.22 or later
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..09d36fb
--- /dev/null
+++ b/go.mod
@@ -0,0 +1 @@
+module boringssl.googlesource.com/boringssl
diff --git a/ssl/test/runner/chacha20_poly1305.go b/ssl/test/runner/chacha20_poly1305.go
index 866f724..446fb55 100644
--- a/ssl/test/runner/chacha20_poly1305.go
+++ b/ssl/test/runner/chacha20_poly1305.go
@@ -20,7 +20,7 @@
 	"encoding/binary"
 	"errors"
 
-	"./poly1305"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/poly1305"
 )
 
 // See RFC 7539.
diff --git a/ssl/test/runner/ed25519/ed25519.go b/ssl/test/runner/ed25519/ed25519.go
index dfef0ff..9a27332 100644
--- a/ssl/test/runner/ed25519/ed25519.go
+++ b/ssl/test/runner/ed25519/ed25519.go
@@ -21,7 +21,7 @@
 	"io"
 	"strconv"
 
-	"./internal/edwards25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/ed25519/internal/edwards25519"
 )
 
 const (
diff --git a/ssl/test/runner/ed25519/ed25519_test.go b/ssl/test/runner/ed25519/ed25519_test.go
index 02c9861..b84cfa8 100644
--- a/ssl/test/runner/ed25519/ed25519_test.go
+++ b/ssl/test/runner/ed25519/ed25519_test.go
@@ -15,7 +15,7 @@
 	"strings"
 	"testing"
 
-	"./internal/edwards25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/ed25519/internal/edwards25519"
 )
 
 type zeroReader struct{}
diff --git a/ssl/test/runner/handshake_client.go b/ssl/test/runner/handshake_client.go
index 49e947d..4dfa469 100644
--- a/ssl/test/runner/handshake_client.go
+++ b/ssl/test/runner/handshake_client.go
@@ -19,7 +19,7 @@
 	"net"
 	"time"
 
-	"./ed25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/ed25519"
 )
 
 type clientHandshakeState struct {
diff --git a/ssl/test/runner/handshake_server.go b/ssl/test/runner/handshake_server.go
index ca7a7d3..4950a4f 100644
--- a/ssl/test/runner/handshake_server.go
+++ b/ssl/test/runner/handshake_server.go
@@ -18,7 +18,7 @@
 	"math/big"
 	"time"
 
-	"./ed25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/ed25519"
 )
 
 // serverHandshakeState contains details of a server handshake in progress.
diff --git a/ssl/test/runner/key_agreement.go b/ssl/test/runner/key_agreement.go
index 5a30469..791325c 100644
--- a/ssl/test/runner/key_agreement.go
+++ b/ssl/test/runner/key_agreement.go
@@ -15,8 +15,8 @@
 	"io"
 	"math/big"
 
-	"./curve25519"
-	"./ed25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/curve25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/ed25519"
 )
 
 type keyType int
diff --git a/ssl/test/runner/sign.go b/ssl/test/runner/sign.go
index ceae05c..0c963d9 100644
--- a/ssl/test/runner/sign.go
+++ b/ssl/test/runner/sign.go
@@ -18,7 +18,7 @@
 	"fmt"
 	"math/big"
 
-	"./ed25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/ed25519"
 )
 
 type signer interface {
diff --git a/ssl/test/runner/tls.go b/ssl/test/runner/tls.go
index 225794b..41931be 100644
--- a/ssl/test/runner/tls.go
+++ b/ssl/test/runner/tls.go
@@ -18,7 +18,7 @@
 	"strings"
 	"time"
 
-	"./ed25519"
+	"boringssl.googlesource.com/boringssl/ssl/test/runner/ed25519"
 )
 
 // Server returns a new TLS server side connection