gossa/gossa_embed.go
Ivan Kovmir 33c93fc0b4 Fix repository file permissions
Source files should not be executable.
2024-03-27 11:55:39 +01:00

26 lines
613 B
Go

package main
import (
_ "embed"
"encoding/base64"
"html/template"
"strings"
)
//go:embed ui/script.js
var scriptJs string
//go:embed ui/style.css
var styleCss string
//go:embed ui/favicon.svg
var faviconSvg []byte
//go:embed ui/ui.tmpl
var template0 string
// fill in template
var template1 = strings.Replace(template0, "css_will_be_here", styleCss, 1)
var template2 = strings.Replace(template1, "js_will_be_here", scriptJs, 1)
var template3 = strings.Replace(template2, "favicon_will_be_here", base64.StdEncoding.EncodeToString(faviconSvg), 2)
var templateParsed, _ = template.New("").Parse(template3)