Skip to content

Commit

Permalink
Upgrade packr to v2 (packr2)
Browse files Browse the repository at this point in the history
  • Loading branch information
aurpine committed Aug 12, 2019
1 parent ff64f6b commit 5d3dde3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ help: ## Show this help

bin/linux/ctl: $(GOFILES_BUILD)
@echo "$@"
@GOOS=linux CGO_ENABLED=0 packr build -o bin/linux/ctl github.com/wish/ctl
packr2
@GOOS=linux CGO_ENABLED=0 go build -o bin/linux/ctl github.com/wish/ctl
packr2 clean

bin/darwin/ctl: $(GOFILES_BUILD)
@echo "$@"
@GOOS=darwin CGO_ENABLED=0 packr build -o bin/darwin/ctl github.com/wish/ctl
packr2
@GOOS=darwin CGO_ENABLED=0 go build -o bin/darwin/ctl github.com/wish/ctl
packr2 clean

.PHONY: all
all: bin/linux/ctl bin/darwin/ctl ## Builds ctl binaries for linux and osx
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ require (
github.com/fatih/color v0.0.0-20181010231311-3f9d52f7176a // indirect
github.com/go-kit/kit v0.9.0 // indirect
github.com/gobuffalo/logger v1.0.1 // indirect
github.com/gobuffalo/packr v1.30.1
github.com/gobuffalo/packr/v2 v2.5.2 // indirect
github.com/gobuffalo/packr/v2 v2.5.2
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/google/go-cmp v0.3.1 // indirect
github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect
Expand Down Expand Up @@ -45,7 +44,7 @@ require (
golang.org/x/mobile v0.0.0-20190806162312-597adff16ade // indirect
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect
golang.org/x/sys v0.0.0-20190812172437-4e8604ab3aff // indirect
golang.org/x/tools v0.0.0-20190812215550-89a01ca1a8d2 // indirect
golang.org/x/tools v0.0.0-20190812220939-2ad8dc80bc2f // indirect
google.golang.org/grpc v1.22.1 // indirect
gopkg.in/yaml.v2 v2.2.2
honnef.co/go/tools v0.0.1-2019.2.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuT
github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs=
github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4=
github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q=
github.com/gobuffalo/packr v1.30.1 h1:hu1fuVR3fXEZR7rXNW3h8rqSML8EVAf6KNm0NKO/wKg=
github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk=
github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw=
github.com/gobuffalo/packr/v2 v2.5.2 h1:4EvjeIpQLZuRIljwnidYgbRXbr1yIzVRrESiLjqKj6s=
github.com/gobuffalo/packr/v2 v2.5.2/go.mod h1:sgEE1xNZ6G0FNN5xn9pevVu4nywaxHvgup67xisti08=
Expand Down Expand Up @@ -495,6 +493,8 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw
golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190812215550-89a01ca1a8d2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190812220939-2ad8dc80bc2f h1:KAXjLgBte6foSAI7o23ZOSoPyzSoxjpUFoQoKykt/zA=
golang.org/x/tools v0.0.0-20190812220939-2ad8dc80bc2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
Expand Down
4 changes: 2 additions & 2 deletions pkg/web/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package web

import (
"fmt"
"github.com/gobuffalo/packr"
"github.com/gobuffalo/packr/v2"
"github.com/spf13/viper"
"github.com/wish/ctl/cmd/util/parsing"
"github.com/wish/ctl/pkg/client"
Expand All @@ -21,7 +21,7 @@ func Serve(cl *client.Client, endpoint string) {
"Title": strings.Title,
})

box := packr.NewBox("./template")
box := packr.New("all", "./template")

box.Walk(func(path string, f packr.File) error {
temp := templates.New(f.Name())
Expand Down

0 comments on commit 5d3dde3

Please sign in to comment.