From af3fc4005a1a5bb8b0185e652a0e0ba8693d098c Mon Sep 17 00:00:00 2001 From: Martin Tournoij Date: Tue, 5 Oct 2021 21:08:26 +0800 Subject: [PATCH] Compile error when using Go 1.13 or older Fixes #29 --- go.mod | 2 +- old.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 old.go diff --git a/go.mod b/go.mod index b3a4c0f..f7b415c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module arp242.net/uni/v2 -go 1.13 +go 1.14 require ( zgo.at/zli v0.0.0-20210330134141-b5f2a73532d6 diff --git a/old.go b/old.go new file mode 100644 index 0000000..308fdb9 --- /dev/null +++ b/old.go @@ -0,0 +1,11 @@ +//go:build !go1.14 +// +build !go1.14 + +package main + +// Make sure people don't try to build with older versions of Go, as that will +// introduce some runtime problems (e.g. using %w) and/or give confusing "no +// such function" errors. +func init() { + "You need Go 1.14 or newer to compile uni" +}