diff options
| author | Shulhan <m.shulhan@gmail.com> | 2022-09-13 21:00:21 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2022-09-13 21:00:21 +0700 |
| commit | f9bfc4b0f1cb1fcea35baa0a7b512c103168876f (patch) | |
| tree | d63fa15773c4ab3643e24609143cda96f9ade1d9 /generate.go | |
| parent | e96ae32fe5061bac41b7a8c8ec4a460760261141 (diff) | |
| download | golang-id-web-f9bfc4b0f1cb1fcea35baa0a7b512c103168876f.tar.xz | |
all: gabungkan script go:generate menjadi sub-perintah "embed"
Daripada memanggil "go generate", yang terpisah dengan program
cmd/www-golangid, gabungkan mereka sehingga untuk menghasilkan
berkas static.go tinggal memanggil perintah
$ go run ./cmd/www-golangid embed
Diffstat (limited to 'generate.go')
| -rw-r--r-- | generate.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/generate.go b/generate.go deleted file mode 100644 index df216bf..0000000 --- a/generate.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2019, The golang-id.org Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:generate go run generate.go - -package main - -import ( - "git.sr.ht/~shulhan/ciigo" - "github.com/shuLhan/share/lib/memfs" -) - -func main() { - opts := &ciigo.EmbedOptions{ - ConvertOptions: ciigo.ConvertOptions{ - Root: "_content", - HtmlTemplate: "_content/html.tmpl", - }, - EmbedOptions: memfs.EmbedOptions{ - PackageName: "main", - VarName: "memFS", - GoFileName: "cmd/www-golangid/static.go", - }, - } - ciigo.GoEmbed(opts) -} |
