Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
use packd interfaces (#1457)
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates authored Nov 17, 2018
1 parent 8a86404 commit aaa524b
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 36 deletions.
3 changes: 2 additions & 1 deletion generators/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package docker
import (
"github.com/gobuffalo/buffalo/generators"
"github.com/gobuffalo/makr"
"github.com/gobuffalo/packd"
"github.com/gobuffalo/packr"
"github.com/pkg/errors"
)
Expand All @@ -16,7 +17,7 @@ func (d Generator) Run(root string, data makr.Data) error {
return d.Style != "none"
},
Runner: func(root string, data makr.Data) error {
var box packr.Box
var box packd.Box
switch d.Style {
case "standard":
box = packr.NewBox("./standard/templates")
Expand Down
8 changes: 4 additions & 4 deletions generators/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"

"github.com/gobuffalo/packr"
"github.com/gobuffalo/packd"
)

// File represents the file to be templated
Expand All @@ -18,10 +18,10 @@ type File struct {
// Files is a slice of File
type Files []File

// FindByBox all the .tmpl files inside the packr.Box
func FindByBox(box packr.Box) (Files, error) {
// FindByBox all the .tmpl files inside the packd.Box
func FindByBox(box packd.Box) (Files, error) {
files := Files{}
err := box.Walk(func(p string, file packr.File) error {
err := box.Walk(func(p string, file packd.File) error {
if filepath.Ext(p) == ".tmpl" {
p = strings.TrimPrefix(p, "/")
f := File{ReadPath: p}
Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
module github.com/gobuffalo/buffalo

require (
github.com/codegangsta/negroni v1.0.0 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dustin/go-humanize v1.0.0
github.com/fatih/color v1.7.0
github.com/gobuffalo/buffalo-plugins v1.6.10
github.com/gobuffalo/buffalo-pop v1.1.13
github.com/gobuffalo/envy v1.6.8
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/gobuffalo/buffalo-plugins v1.6.11
github.com/gobuffalo/buffalo-pop v1.1.14
github.com/gobuffalo/envy v1.6.9
github.com/gobuffalo/events v1.1.7
github.com/gobuffalo/fizz v1.1.2 // indirect
github.com/gobuffalo/genny v0.0.0-20181111200257-599b33630ab4
github.com/gobuffalo/fizz v1.1.3 // indirect
github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d
github.com/gobuffalo/github_flavored_markdown v1.0.7
github.com/gobuffalo/httptest v1.0.4
github.com/gobuffalo/makr v1.1.5
Expand All @@ -20,8 +22,8 @@ require (
github.com/gobuffalo/mw-i18n v0.0.0-20181027200759-09e0c99be4d3
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e
github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189
github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff
github.com/gobuffalo/packr v1.19.0
github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7
github.com/gobuffalo/packr v1.21.0
github.com/gobuffalo/plush v3.7.22+incompatible
github.com/gobuffalo/pop v4.9.0+incompatible
github.com/gobuffalo/tags v2.0.11+incompatible
Expand All @@ -35,18 +37,16 @@ require (
github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4
github.com/markbates/refresh v1.4.11
github.com/markbates/sigtx v1.0.0
github.com/mattn/go-sqlite3 v1.10.0 // indirect
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba
github.com/pkg/errors v0.8.0
github.com/sirupsen/logrus v1.2.0
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.2.1
github.com/stretchr/testify v1.2.2
github.com/unrolled/secure v0.0.0-20181022170031-4b6b7cf51606 // indirect
golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd
golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8 // indirect
golang.org/x/tools v0.0.0-20181111003725-6d71ab8aade0
golang.org/x/tools v0.0.0-20181114190951-94339b83286c
google.golang.org/appengine v1.3.0 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc
)
Loading

0 comments on commit aaa524b

Please sign in to comment.