From e44d286ab2a5405ad9a8f3fd384d62c6a50a9adf Mon Sep 17 00:00:00 2001 From: Blake Miner Date: Mon, 18 Apr 2022 11:22:21 -0400 Subject: [PATCH] Commit test code and go.mod --- embed.txt | 1 + go.mod | 3 +++ test.go | 11 +++++++++++ 3 files changed, 15 insertions(+) create mode 100644 embed.txt create mode 100644 go.mod create mode 100644 test.go diff --git a/embed.txt b/embed.txt new file mode 100644 index 0000000..597544d --- /dev/null +++ b/embed.txt @@ -0,0 +1 @@ +This is a test of //go:embed diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..451e570 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.icomputeconsulting.com/bminer/go-embed-test + +go 1.18 diff --git a/test.go b/test.go new file mode 100644 index 0000000..d2a34b9 --- /dev/null +++ b/test.go @@ -0,0 +1,11 @@ +package embedtest + +import _ "embed" // need to import embed + +//go:embed embed.txt +var embed string + +// Embed will return the contents of embed.txt +func Embed() string { + return embed +}