aboutsummaryrefslogtreecommitdiff
path: root/templates/templates.go
diff options
context:
space:
mode:
authorGravatar Luciano Nooijen <luciano@bytecode.nl> 2021-09-11 00:57:07 +0200
committerGravatar GitHub <noreply@github.com> 2021-09-10 15:57:07 -0700
commitdd62ebd406a23184ec072d38894a5a3aac141b0d (patch)
tree7a0de51f9c0439b20a837410ae054ed0c2da34af /templates/templates.go
parent68f125ff5e3042610be114899531d73137726027 (diff)
downloadsally-dd62ebd406a23184ec072d38894a5a3aac141b0d.tar.gz
sally-dd62ebd406a23184ec072d38894a5a3aac141b0d.tar.zst
sally-dd62ebd406a23184ec072d38894a5a3aac141b0d.zip
Use go embed for templates (#50)
Go 1.16 includes a `//go:embed` directive that obviates the need for bindata. Use `//go:embed` instead of bindata for templates used in sally. Signed-off-by: Luciano Nooijen <luciano@bytecode.nl> Co-authored-by: Abhinav Gupta <abg@uber.com>
Diffstat (limited to 'templates/templates.go')
-rw-r--r--templates/templates.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/templates.go b/templates/templates.go
new file mode 100644
index 0000000..40d229a
--- /dev/null
+++ b/templates/templates.go
@@ -0,0 +1,9 @@
+package templates
+
+import _ "embed"
+
+//go:embed index.html
+var Index string
+
+//go:embed package.html
+var Package string