summaryrefslogtreecommitdiff
path: root/internal/nametransform/raw64_go1.4.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-11-01 19:20:55 +0100
committerJakob Unterwurzacher2016-11-01 19:25:59 +0100
commitd15122d3d6b67d42617ed9950ce5273d0dba64fd (patch)
treecf8928a9335ec7b1fea3e03fd8a32042a8485189 /internal/nametransform/raw64_go1.4.go
parentf4c367381ea4884a9b460e073a7809665031a88c (diff)
Add Go 1.4 compatibility layer for raw64
Using raw64 will not work, but at least it will compile.
Diffstat (limited to 'internal/nametransform/raw64_go1.4.go')
-rw-r--r--internal/nametransform/raw64_go1.4.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/nametransform/raw64_go1.4.go b/internal/nametransform/raw64_go1.4.go
new file mode 100644
index 0000000..bbffb69
--- /dev/null
+++ b/internal/nametransform/raw64_go1.4.go
@@ -0,0 +1,18 @@
+//+build !go1.5
+
+package nametransform
+
+import (
+ "encoding/base64"
+ "log"
+)
+
+const (
+ HaveRaw64 = false
+)
+
+func getRaw64Encoding() *base64.Encoding {
+ log.Panicf("Tried to use base64.RawURLEncoding but your Go version does not provide it.\n" +
+ "You need Go 1.5 or higher.")
+ return nil
+}