You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes from statik to go:embed for examples serving
This reduces build complexity by eliminating a generation step with go:embed. This implicitly reduces tech debt even more because not only were we using a stalled project, statik, but also a fork of it.
go:embed is not perfect, as it disallows the file name go.mod. The workaround is to rename it to go.mod_ per golang/go#45197. While this is imperfect an if-statement is a far better punch than a dependency on a fork of a stalled project which also requires a codegen step.
Signed-off-by: Adrian Cole <[email protected]>
Copy file name to clipboardExpand all lines: pkg/extension/example/init/registry/default.go
+5-12
Original file line number
Diff line number
Diff line change
@@ -14,26 +14,19 @@
14
14
15
15
package registry
16
16
17
-
//go:generate go run github.com/rakyll/statik -p=templates -m -ns=example/init/templates -src=../../../../../data/example/init/templates -a -include=* -f
0 commit comments