Skip to content

Instantly share code, notes, and snippets.

@ajruckman
Created December 6, 2018 12:46
Show Gist options
  • Save ajruckman/23f01c441446b51d688f221b88ce33a1 to your computer and use it in GitHub Desktop.
Save ajruckman/23f01c441446b51d688f221b88ce33a1 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
<script src="/static/script/script.js"></script>
<script src="/static/lib/jquery-3.3.1.min.js"></script>
<link href="/static/style/style.css" rel="stylesheet">
</head>
<body>
{{.Demo}}
</body>
</html>
package main
import (
"fmt"
"github.com/gobuffalo/packr/v2"
)
func main() {
box := packr.New("box1", "./templates")
html, err := box.FindString("base.html")
if err != nil {
panic(err)
}
fmt.Println(html)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment