Blame 0007-Add-support-for-Go-1.16.patch

349460a
From 87cb1e65c80f62cf0a56c1bf99d8c1258d84aaa5 Mon Sep 17 00:00:00 2001
349460a
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
349460a
Date: Sun, 17 Jan 2021 05:07:17 -0500
349460a
Subject: [PATCH 7/7] Add support for Go 1.16.
349460a
349460a
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
349460a
---
349460a
 builder/config.go          | 4 ++--
349460a
 cgo/testdata/errors.out.go | 4 ++--
349460a
 2 files changed, 4 insertions(+), 4 deletions(-)
349460a
349460a
diff --git a/builder/config.go b/builder/config.go
349460a
index 9564386..b145ec5 100644
349460a
--- a/builder/config.go
349460a
+++ b/builder/config.go
349460a
@@ -25,8 +25,8 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {
349460a
 	if err != nil {
349460a
 		return nil, fmt.Errorf("could not read version from GOROOT (%v): %v", goroot, err)
349460a
 	}
349460a
-	if major != 1 || minor < 11 || minor > 15 {
349460a
-		return nil, fmt.Errorf("requires go version 1.11 through 1.15, got go%d.%d", major, minor)
349460a
+	if major != 1 || minor < 11 || minor > 16 {
349460a
+		return nil, fmt.Errorf("requires go version 1.11 through 1.16, got go%d.%d", major, minor)
349460a
 	}
349460a
 	clangHeaderPath := getClangHeaderPath(goenv.Get("TINYGOROOT"))
349460a
 	return &compileopts.Config{
349460a
diff --git a/cgo/testdata/errors.out.go b/cgo/testdata/errors.out.go
349460a
index ace2390..b5d6978 100644
349460a
--- a/cgo/testdata/errors.out.go
349460a
+++ b/cgo/testdata/errors.out.go
349460a
@@ -4,10 +4,10 @@
349460a
 //     testdata/errors.go:13:23: unexpected token )
349460a
 
349460a
 // Type checking errors after CGo processing:
349460a
-//     testdata/errors.go:102: 2 << 10 (untyped int constant 2048) overflows uint8
349460a
+//     testdata/errors.go:102: cannot use 2 << 10 (untyped int constant 2048) as uint8 value in variable declaration (overflows)
349460a
 //     testdata/errors.go:105: unknown field z in struct literal
349460a
 //     testdata/errors.go:108: undeclared name: C.SOME_CONST_1
349460a
-//     testdata/errors.go:110: C.SOME_CONST_3 (untyped int constant 1234) overflows byte
349460a
+//     testdata/errors.go:110: cannot use C.SOME_CONST_3 (untyped int constant 1234) as byte value in variable declaration (overflows)
349460a
 
349460a
 package main
349460a
 
349460a
-- 
349460a
2.29.2
349460a