summaryrefslogtreecommitdiff
path: root/generate.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2022-09-13 21:00:21 +0700
committerShulhan <m.shulhan@gmail.com>2022-09-13 21:00:21 +0700
commitf9bfc4b0f1cb1fcea35baa0a7b512c103168876f (patch)
treed63fa15773c4ab3643e24609143cda96f9ade1d9 /generate.go
parente96ae32fe5061bac41b7a8c8ec4a460760261141 (diff)
downloadgolang-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.go27
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)
-}