Files
polaris/vendor/github.com/gobuffalo/packr/example/example.go
Bobby Brennan 54a4f92695 Pack static assets into packr box for portability
copy config.yaml to docker image

enable external usage of dashboard package

gofmt

fix comment

use packr for assets

add gobuffalo/packr dependency

add dependencies

fix pointer issues

add output-file option
2019-04-18 18:25:16 +00:00

43 lines
627 B
Go

package example
import (
"github.com/gobuffalo/packr"
)
var a = packr.NewBox("./foo")
const constString = "./constant"
type S struct{}
func (S) f(packr.Box) {}
func init() {
b := "./variable"
packr.NewBox(b)
packr.NewBox(constString)
// Cannot work from a function
packr.NewBox(strFromFunc())
// This variable should not be added
fromFunc := strFromFunc()
packr.NewBox(fromFunc)
foo("/templates", packr.NewBox("./templates"))
packr.NewBox("./assets")
packr.NewBox("./bar")
s := S{}
s.f(packr.NewBox("./sf"))
}
func strFromFunc() string {
return "./fromFunc"
}
func foo(s string, box packr.Box) {}