Skip to content
This repository was archived by the owner on Jun 25, 2022. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gobuffalo/packr
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.7.1
Choose a base ref
...
head repository: gobuffalo/packr
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.8.0
Choose a head ref
  • 10 commits
  • 73 files changed
  • 5 contributors

Commits on Nov 17, 2019

  1. Update README.md

    markbates authored Nov 17, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b8e70ba View commit details
  2. Update README.md

    markbates authored Nov 17, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    62fdd88 View commit details

Commits on Dec 7, 2019

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    4a2800e View commit details

Commits on Mar 1, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e9532f5 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    af4670f View commit details
  3. Remove packr2 dep on envy (#257)

    * Remove packr2 dep on envy
    
    Extract the only parts needed from envy. This will prevent the envy
    package to load .env files on init and cause unexpected behavior.
    
    * Fix duplicate go version in disk-pack/go.mod
    stanislas-m authored Mar 1, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b4b6d10 View commit details
  4. Print version on new line (#246)

    * Print version on new line
    
    * Print v2 version on new line
    laynemcnish authored Mar 1, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e63e9f6 View commit details

Commits on Mar 8, 2020

  1. update deps (#263)

    markbates authored Mar 8, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4f133e3 View commit details
  2. version bump: v2.8.0

    markbates committed Mar 8, 2020
    Copy the full SHA
    9916144 View commit details
  3. version bump: v2.8.0

    markbates committed Mar 8, 2020
    Copy the full SHA
    c6a5045 View commit details
Showing with 377 additions and 1,984 deletions.
  1. +2 −0 .github/CODEOWNERS
  2. +4 −0 .github/FUNDING.yml
  3. +27 −0 .github/workflows/tests.yml
  4. +1 −0 .gitignore
  5. +5 −0 README.md
  6. +0 −71 azure-pipelines.yml
  7. +0 −24 azure-tests.yml
  8. +1 −1 packr/cmd/version.go
  9. +0 −1 v2/Makefile
  10. +4 −0 v2/README.md
  11. +131 −7 v2/SHOULDERS.md
  12. +1 −1 v2/box.go
  13. +1 −1 v2/deprecated.go
  14. +1 −1 v2/file/resolver/disk.go
  15. +11 −7 v2/go.mod
  16. +123 −29 v2/go.sum
  17. +1 −2 v2/helpers.go
  18. +37 −0 v2/internal/envy.go
  19. +0 −25 v2/internal/takeon/github.com/karrick/godirwalk/LICENSE
  20. +0 −215 v2/internal/takeon/github.com/karrick/godirwalk/README.md
  21. +0 −14 v2/internal/takeon/github.com/karrick/godirwalk/debug_development.go
  22. +0 −6 v2/internal/takeon/github.com/karrick/godirwalk/debug_release.go
  23. +0 −90 v2/internal/takeon/github.com/karrick/godirwalk/dirent.go
  24. +0 −37 v2/internal/takeon/github.com/karrick/godirwalk/doc.go
  25. +0 −9 v2/internal/takeon/github.com/karrick/godirwalk/inoWithFileno.go
  26. +0 −10 v2/internal/takeon/github.com/karrick/godirwalk/inoWithIno.go
  27. +0 −22 v2/internal/takeon/github.com/karrick/godirwalk/modeType.go
  28. +0 −37 v2/internal/takeon/github.com/karrick/godirwalk/modeTypeWithType.go
  29. +0 −18 v2/internal/takeon/github.com/karrick/godirwalk/modeTypeWithoutType.go
  30. +0 −29 v2/internal/takeon/github.com/karrick/godirwalk/nameWithNamlen.go
  31. +0 −42 v2/internal/takeon/github.com/karrick/godirwalk/nameWithoutNamlen.go
  32. +0 −73 v2/internal/takeon/github.com/karrick/godirwalk/readdir.go
  33. +0 −140 v2/internal/takeon/github.com/karrick/godirwalk/scandir_unix.go
  34. +0 −92 v2/internal/takeon/github.com/karrick/godirwalk/scandir_windows.go
  35. +0 −44 v2/internal/takeon/github.com/karrick/godirwalk/scanner.go
  36. +0 −22 v2/internal/takeon/github.com/karrick/godirwalk/symdir.go
  37. +0 −316 v2/internal/takeon/github.com/karrick/godirwalk/walk.go
  38. +0 −29 v2/internal/takeon/github.com/markbates/errx/.gitignore
  39. +0 −21 v2/internal/takeon/github.com/markbates/errx/LICENSE
  40. +0 −61 v2/internal/takeon/github.com/markbates/errx/Makefile
  41. +0 −6 v2/internal/takeon/github.com/markbates/errx/SHOULDERS.md
  42. +0 −71 v2/internal/takeon/github.com/markbates/errx/azure-pipelines.yml
  43. +0 −19 v2/internal/takeon/github.com/markbates/errx/azure-tests.yml
  44. +0 −23 v2/internal/takeon/github.com/markbates/errx/errx.go
  45. +0 −4 v2/internal/takeon/github.com/markbates/errx/version.go
  46. +0 −29 v2/internal/takeon/github.com/markbates/oncer/.gitignore
  47. +0 −21 v2/internal/takeon/github.com/markbates/oncer/LICENSE
  48. +0 −40 v2/internal/takeon/github.com/markbates/oncer/Makefile
  49. +0 −20 v2/internal/takeon/github.com/markbates/oncer/deprecate.go
  50. +0 −7 v2/internal/takeon/github.com/markbates/oncer/log.go
  51. +0 −19 v2/internal/takeon/github.com/markbates/oncer/log_debug.go
  52. +0 −26 v2/internal/takeon/github.com/markbates/oncer/oncer.go
  53. +0 −29 v2/internal/takeon/github.com/markbates/safe/.gitignore
  54. +0 −3 v2/internal/takeon/github.com/markbates/safe/.gometalinter.json
  55. +0 −26 v2/internal/takeon/github.com/markbates/safe/.travis.yml
  56. +0 −21 v2/internal/takeon/github.com/markbates/safe/LICENSE
  57. +0 −55 v2/internal/takeon/github.com/markbates/safe/Makefile
  58. +0 −33 v2/internal/takeon/github.com/markbates/safe/safe.go
  59. +0 −8 v2/internal/takeon/github.com/markbates/safe/shoulders.md
  60. +0 −3 v2/internal/takeon/github.com/markbates/safe/version.go
  61. +3 −3 v2/jam/parser/finder.go
  62. +1 −1 v2/jam/parser/gogen.go
  63. +1 −1 v2/jam/parser/parser_test.go
  64. +1 −1 v2/jam/parser/roots.go
  65. +2 −0 v2/jam/store/_fixtures/disk-pack/go.mod
  66. +3 −2 v2/jam/store/_fixtures/disk-pack/go.sum
  67. +5 −4 v2/jam/store/disk.go
  68. +3 −4 v2/jam/store/disk_tmpl.go
  69. +1 −1 v2/packr.go
  70. +0 −3 v2/packr2/cmd/fix/fix.go
  71. +5 −2 v2/packr2/cmd/gocmd.go
  72. +1 −1 v2/packr2/cmd/version.go
  73. +1 −1 v2/version.go
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default owner
* @gobuffalo/core-managers
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: markbates
patreon: buffalo
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests
on: [push, pull_request]
jobs:

tests:
name: ${{matrix.go-version}} ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.12.x, 1.13.x]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Test v1
run: |
go get -t -v ./...
go test -race ./...
go install -v ./packr
- name: Test v2
run: |
cd v2
go get -t -v ./...
go test -race ./...
go install -v ./packr2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -33,4 +33,5 @@ gin-bin
debug.test
.grifter/
*-packr.go
.idea/

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
**NOTICE: Please consider migrating your projects to [github.com/markbates/pkger](https://github.com/markbates/pkger). It has an idiomatic API, minimal dependencies, a stronger test suite (tested directly against the std lib counterparts), transparent tooling, and more.**

https://blog.gobuffalo.io/introducing-pkger-static-file-embedding-in-go-1ce76dc79c65


# packr (v1)

[![GoDoc](https://godoc.org/github.com/gobuffalo/packr?status.svg)](https://godoc.org/github.com/gobuffalo/packr)
71 changes: 0 additions & 71 deletions azure-pipelines.yml

This file was deleted.

24 changes: 0 additions & 24 deletions azure-tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion packr/cmd/version.go
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "prints packr version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Print(packr.Version)
fmt.Println(packr.Version)
},
}

1 change: 0 additions & 1 deletion v2/Makefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ else
endif

deps:
$(GO_BIN) get github.com/gobuffalo/release
$(GO_BIN) get -tags ${TAGS} -t ./...
$(GO_BIN) install -v ./packr2
make tidy
4 changes: 4 additions & 0 deletions v2/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**NOTICE: Please consider migrating your projects to github.com/markbates/pkger. It has an idiomatic API, minimal dependencies, a stronger test suite (tested directly against the std lib counterparts), transparent tooling, and more.**

https://blog.gobuffalo.io/introducing-pkger-static-file-embedding-in-go-1ce76dc79c65

# Packr (v2)

[![GoDoc](https://godoc.org/github.com/gobuffalo/packr/v2?status.svg)](https://godoc.org/github.com/gobuffalo/packr/v2)
138 changes: 131 additions & 7 deletions v2/SHOULDERS.md
Original file line number Diff line number Diff line change
@@ -5,36 +5,96 @@ github.com/gobuffalo/packr/v2 does not try to reinvent the wheel! Instead, it us
Thank you to the following **GIANTS**:


* [cloud.google.com/go](https://godoc.org/cloud.google.com/go)

* [github.com/BurntSushi/toml](https://godoc.org/github.com/BurntSushi/toml)

* [github.com/OneOfOne/xxhash](https://godoc.org/github.com/OneOfOne/xxhash)

* [github.com/alecthomas/template](https://godoc.org/github.com/alecthomas/template)

* [github.com/alecthomas/units](https://godoc.org/github.com/alecthomas/units)

* [github.com/armon/consul-api](https://godoc.org/github.com/armon/consul-api)

* [github.com/coreos/etcd](https://godoc.org/github.com/coreos/etcd)
* [github.com/beorn7/perks](https://godoc.org/github.com/beorn7/perks)

* [github.com/cespare/xxhash](https://godoc.org/github.com/cespare/xxhash)

* [github.com/client9/misspell](https://godoc.org/github.com/client9/misspell)

* [github.com/coreos/bbolt](https://godoc.org/github.com/coreos/bbolt)

* [github.com/coreos/go-etcd](https://godoc.org/github.com/coreos/go-etcd)
* [github.com/coreos/etcd](https://godoc.org/github.com/coreos/etcd)

* [github.com/coreos/go-semver](https://godoc.org/github.com/coreos/go-semver)

* [github.com/cpuguy83/go-md2man](https://godoc.org/github.com/cpuguy83/go-md2man)
* [github.com/coreos/go-systemd](https://godoc.org/github.com/coreos/go-systemd)

* [github.com/coreos/pkg](https://godoc.org/github.com/coreos/pkg)

* [github.com/cpuguy83/go-md2man/v2](https://godoc.org/github.com/cpuguy83/go-md2man/v2)

* [github.com/davecgh/go-spew](https://godoc.org/github.com/davecgh/go-spew)

* [github.com/dgrijalva/jwt-go](https://godoc.org/github.com/dgrijalva/jwt-go)

* [github.com/dgryski/go-sip13](https://godoc.org/github.com/dgryski/go-sip13)

* [github.com/fsnotify/fsnotify](https://godoc.org/github.com/fsnotify/fsnotify)

* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy)
* [github.com/ghodss/yaml](https://godoc.org/github.com/ghodss/yaml)

* [github.com/go-kit/kit](https://godoc.org/github.com/go-kit/kit)

* [github.com/go-logfmt/logfmt](https://godoc.org/github.com/go-logfmt/logfmt)

* [github.com/go-stack/stack](https://godoc.org/github.com/go-stack/stack)

* [github.com/gobuffalo/logger](https://godoc.org/github.com/gobuffalo/logger)

* [github.com/gobuffalo/packd](https://godoc.org/github.com/gobuffalo/packd)

* [github.com/gogo/protobuf](https://godoc.org/github.com/gogo/protobuf)

* [github.com/golang/glog](https://godoc.org/github.com/golang/glog)

* [github.com/golang/groupcache](https://godoc.org/github.com/golang/groupcache)

* [github.com/golang/mock](https://godoc.org/github.com/golang/mock)

* [github.com/golang/protobuf](https://godoc.org/github.com/golang/protobuf)

* [github.com/google/btree](https://godoc.org/github.com/google/btree)

* [github.com/google/go-cmp](https://godoc.org/github.com/google/go-cmp)

* [github.com/gorilla/websocket](https://godoc.org/github.com/gorilla/websocket)

* [github.com/grpc-ecosystem/go-grpc-middleware](https://godoc.org/github.com/grpc-ecosystem/go-grpc-middleware)

* [github.com/grpc-ecosystem/go-grpc-prometheus](https://godoc.org/github.com/grpc-ecosystem/go-grpc-prometheus)

* [github.com/grpc-ecosystem/grpc-gateway](https://godoc.org/github.com/grpc-ecosystem/grpc-gateway)

* [github.com/hashicorp/hcl](https://godoc.org/github.com/hashicorp/hcl)

* [github.com/inconshreveable/mousetrap](https://godoc.org/github.com/inconshreveable/mousetrap)

* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv)
* [github.com/jonboulle/clockwork](https://godoc.org/github.com/jonboulle/clockwork)

* [github.com/julienschmidt/httprouter](https://godoc.org/github.com/julienschmidt/httprouter)

* [github.com/karrick/godirwalk](https://godoc.org/github.com/karrick/godirwalk)

* [github.com/kisielk/errcheck](https://godoc.org/github.com/kisielk/errcheck)

* [github.com/kisielk/gotool](https://godoc.org/github.com/kisielk/gotool)

* [github.com/konsorten/go-windows-terminal-sequences](https://godoc.org/github.com/konsorten/go-windows-terminal-sequences)

* [github.com/kr/logfmt](https://godoc.org/github.com/kr/logfmt)

* [github.com/kr/pretty](https://godoc.org/github.com/kr/pretty)

* [github.com/kr/pty](https://godoc.org/github.com/kr/pty)
@@ -43,20 +103,52 @@ Thank you to the following **GIANTS**:

* [github.com/magiconair/properties](https://godoc.org/github.com/magiconair/properties)

* [github.com/markbates/errx](https://godoc.org/github.com/markbates/errx)

* [github.com/markbates/oncer](https://godoc.org/github.com/markbates/oncer)

* [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe)

* [github.com/matttproud/golang_protobuf_extensions](https://godoc.org/github.com/matttproud/golang_protobuf_extensions)

* [github.com/mitchellh/go-homedir](https://godoc.org/github.com/mitchellh/go-homedir)

* [github.com/mitchellh/mapstructure](https://godoc.org/github.com/mitchellh/mapstructure)

* [github.com/mwitkow/go-conntrack](https://godoc.org/github.com/mwitkow/go-conntrack)

* [github.com/oklog/ulid](https://godoc.org/github.com/oklog/ulid)

* [github.com/pelletier/go-toml](https://godoc.org/github.com/pelletier/go-toml)

* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors)

* [github.com/pmezard/go-difflib](https://godoc.org/github.com/pmezard/go-difflib)

* [github.com/prometheus/client_golang](https://godoc.org/github.com/prometheus/client_golang)

* [github.com/prometheus/client_model](https://godoc.org/github.com/prometheus/client_model)

* [github.com/prometheus/common](https://godoc.org/github.com/prometheus/common)

* [github.com/prometheus/procfs](https://godoc.org/github.com/prometheus/procfs)

* [github.com/prometheus/tsdb](https://godoc.org/github.com/prometheus/tsdb)

* [github.com/rogpeppe/fastuuid](https://godoc.org/github.com/rogpeppe/fastuuid)

* [github.com/rogpeppe/go-internal](https://godoc.org/github.com/rogpeppe/go-internal)

* [github.com/russross/blackfriday](https://godoc.org/github.com/russross/blackfriday)
* [github.com/russross/blackfriday/v2](https://godoc.org/github.com/russross/blackfriday/v2)

* [github.com/shurcooL/sanitized_anchor_name](https://godoc.org/github.com/shurcooL/sanitized_anchor_name)

* [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus)

* [github.com/soheilhy/cmux](https://godoc.org/github.com/soheilhy/cmux)

* [github.com/spaolacci/murmur3](https://godoc.org/github.com/spaolacci/murmur3)

* [github.com/spf13/afero](https://godoc.org/github.com/spf13/afero)

* [github.com/spf13/cast](https://godoc.org/github.com/spf13/cast)
@@ -73,26 +165,58 @@ Thank you to the following **GIANTS**:

* [github.com/stretchr/testify](https://godoc.org/github.com/stretchr/testify)

* [github.com/ugorji/go/codec](https://godoc.org/github.com/ugorji/go/codec)
* [github.com/tmc/grpc-websocket-proxy](https://godoc.org/github.com/tmc/grpc-websocket-proxy)

* [github.com/ugorji/go](https://godoc.org/github.com/ugorji/go)

* [github.com/xiang90/probing](https://godoc.org/github.com/xiang90/probing)

* [github.com/xordataexchange/crypt](https://godoc.org/github.com/xordataexchange/crypt)

* [go.etcd.io/bbolt](https://godoc.org/go.etcd.io/bbolt)

* [go.uber.org/atomic](https://godoc.org/go.uber.org/atomic)

* [go.uber.org/multierr](https://godoc.org/go.uber.org/multierr)

* [go.uber.org/zap](https://godoc.org/go.uber.org/zap)

* [golang.org/x/crypto](https://godoc.org/golang.org/x/crypto)

* [golang.org/x/lint](https://godoc.org/golang.org/x/lint)

* [golang.org/x/mod](https://godoc.org/golang.org/x/mod)

* [golang.org/x/net](https://godoc.org/golang.org/x/net)

* [golang.org/x/oauth2](https://godoc.org/golang.org/x/oauth2)

* [golang.org/x/sync](https://godoc.org/golang.org/x/sync)

* [golang.org/x/sys](https://godoc.org/golang.org/x/sys)

* [golang.org/x/text](https://godoc.org/golang.org/x/text)

* [golang.org/x/time](https://godoc.org/golang.org/x/time)

* [golang.org/x/tools](https://godoc.org/golang.org/x/tools)

* [golang.org/x/xerrors](https://godoc.org/golang.org/x/xerrors)

* [google.golang.org/appengine](https://godoc.org/google.golang.org/appengine)

* [google.golang.org/genproto](https://godoc.org/google.golang.org/genproto)

* [google.golang.org/grpc](https://godoc.org/google.golang.org/grpc)

* [gopkg.in/alecthomas/kingpin.v2](https://godoc.org/gopkg.in/alecthomas/kingpin.v2)

* [gopkg.in/check.v1](https://godoc.org/gopkg.in/check.v1)

* [gopkg.in/errgo.v2](https://godoc.org/gopkg.in/errgo.v2)

* [gopkg.in/resty.v1](https://godoc.org/gopkg.in/resty.v1)

* [gopkg.in/yaml.v2](https://godoc.org/gopkg.in/yaml.v2)

* [honnef.co/go/tools](https://godoc.org/honnef.co/go/tools)
2 changes: 1 addition & 1 deletion v2/box.go
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@ import (
"github.com/gobuffalo/packd"
"github.com/gobuffalo/packr/v2/file"
"github.com/gobuffalo/packr/v2/file/resolver"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer"
"github.com/gobuffalo/packr/v2/plog"
"github.com/markbates/oncer"
)

var _ packd.Box = &Box{}
2 changes: 1 addition & 1 deletion v2/deprecated.go
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import (

"github.com/gobuffalo/packr/v2/file"
"github.com/gobuffalo/packr/v2/file/resolver"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer"
"github.com/markbates/oncer"
)

// File has been deprecated and file.File should be used instead
2 changes: 1 addition & 1 deletion v2/file/resolver/disk.go
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ import (
"sync"

"github.com/gobuffalo/packr/v2/file"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk"
"github.com/gobuffalo/packr/v2/plog"
"github.com/karrick/godirwalk"
)

var _ Resolver = &Disk{}
18 changes: 11 additions & 7 deletions v2/go.mod
Original file line number Diff line number Diff line change
@@ -3,13 +3,17 @@ module github.com/gobuffalo/packr/v2
go 1.13

require (
github.com/gobuffalo/envy v1.7.1
github.com/gobuffalo/logger v1.0.1
github.com/gobuffalo/packd v0.3.0
github.com/rogpeppe/go-internal v1.4.0
github.com/gobuffalo/logger v1.0.3
github.com/gobuffalo/packd v1.0.0
github.com/karrick/godirwalk v1.15.3
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/markbates/errx v1.1.0
github.com/markbates/oncer v1.0.0
github.com/markbates/safe v1.0.1
github.com/rogpeppe/go-internal v1.5.2
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.5
github.com/stretchr/testify v1.4.0
github.com/spf13/cobra v0.0.6
github.com/stretchr/testify v1.5.1
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3
golang.org/x/tools v0.0.0-20200308013534-11ec41452d41
)
152 changes: 123 additions & 29 deletions v2/go.sum

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions v2/helpers.go
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ import (
"runtime"
"strings"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/packr/v2/plog"
)

@@ -31,7 +30,7 @@ func resolutionDirTestFilename(filename, og string) (string, bool) {
return ng, true
}

ng = filepath.Join(envy.GoPath(), "src", ng)
ng = filepath.Join(os.Getenv("GOPATH"), "src", ng)
if resolutionDirExists(ng, og) {
return ng, true
}
37 changes: 37 additions & 0 deletions v2/internal/envy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package internal

import (
"os"
"runtime"
"strings"
)

// Mods returns true when go modules supports is enabled
func Mods() bool {
go111 := os.Getenv("GO111MODULE")

if !inGoPath() {
return go111 != "off"
}

return go111 == "on"
}

func inGoPath() bool {
pwd, _ := os.Getwd()
for _, p := range GoPaths() {
if strings.HasPrefix(pwd, p) {
return true
}
}
return false
}

// GoPaths return the defined gopath list.
func GoPaths() []string {
gp := os.Getenv("GOPATH")
if runtime.GOOS == "windows" {
return strings.Split(gp, ";") // Windows uses a different separator
}
return strings.Split(gp, ":")
}
25 changes: 0 additions & 25 deletions v2/internal/takeon/github.com/karrick/godirwalk/LICENSE

This file was deleted.

215 changes: 0 additions & 215 deletions v2/internal/takeon/github.com/karrick/godirwalk/README.md

This file was deleted.

This file was deleted.

This file was deleted.

90 changes: 0 additions & 90 deletions v2/internal/takeon/github.com/karrick/godirwalk/dirent.go

This file was deleted.

37 changes: 0 additions & 37 deletions v2/internal/takeon/github.com/karrick/godirwalk/doc.go

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions v2/internal/takeon/github.com/karrick/godirwalk/inoWithIno.go

This file was deleted.

22 changes: 0 additions & 22 deletions v2/internal/takeon/github.com/karrick/godirwalk/modeType.go

This file was deleted.

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions v2/internal/takeon/github.com/karrick/godirwalk/nameWithNamlen.go

This file was deleted.

This file was deleted.

73 changes: 0 additions & 73 deletions v2/internal/takeon/github.com/karrick/godirwalk/readdir.go

This file was deleted.

140 changes: 0 additions & 140 deletions v2/internal/takeon/github.com/karrick/godirwalk/scandir_unix.go

This file was deleted.

92 changes: 0 additions & 92 deletions v2/internal/takeon/github.com/karrick/godirwalk/scandir_windows.go

This file was deleted.

44 changes: 0 additions & 44 deletions v2/internal/takeon/github.com/karrick/godirwalk/scanner.go

This file was deleted.

22 changes: 0 additions & 22 deletions v2/internal/takeon/github.com/karrick/godirwalk/symdir.go

This file was deleted.

316 changes: 0 additions & 316 deletions v2/internal/takeon/github.com/karrick/godirwalk/walk.go

This file was deleted.

29 changes: 0 additions & 29 deletions v2/internal/takeon/github.com/markbates/errx/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions v2/internal/takeon/github.com/markbates/errx/LICENSE

This file was deleted.

61 changes: 0 additions & 61 deletions v2/internal/takeon/github.com/markbates/errx/Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions v2/internal/takeon/github.com/markbates/errx/SHOULDERS.md

This file was deleted.

71 changes: 0 additions & 71 deletions v2/internal/takeon/github.com/markbates/errx/azure-pipelines.yml

This file was deleted.

19 changes: 0 additions & 19 deletions v2/internal/takeon/github.com/markbates/errx/azure-tests.yml

This file was deleted.

23 changes: 0 additions & 23 deletions v2/internal/takeon/github.com/markbates/errx/errx.go

This file was deleted.

4 changes: 0 additions & 4 deletions v2/internal/takeon/github.com/markbates/errx/version.go

This file was deleted.

29 changes: 0 additions & 29 deletions v2/internal/takeon/github.com/markbates/oncer/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions v2/internal/takeon/github.com/markbates/oncer/LICENSE

This file was deleted.

40 changes: 0 additions & 40 deletions v2/internal/takeon/github.com/markbates/oncer/Makefile

This file was deleted.

20 changes: 0 additions & 20 deletions v2/internal/takeon/github.com/markbates/oncer/deprecate.go

This file was deleted.

7 changes: 0 additions & 7 deletions v2/internal/takeon/github.com/markbates/oncer/log.go

This file was deleted.

19 changes: 0 additions & 19 deletions v2/internal/takeon/github.com/markbates/oncer/log_debug.go

This file was deleted.

26 changes: 0 additions & 26 deletions v2/internal/takeon/github.com/markbates/oncer/oncer.go

This file was deleted.

29 changes: 0 additions & 29 deletions v2/internal/takeon/github.com/markbates/safe/.gitignore

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions v2/internal/takeon/github.com/markbates/safe/.travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions v2/internal/takeon/github.com/markbates/safe/LICENSE

This file was deleted.

55 changes: 0 additions & 55 deletions v2/internal/takeon/github.com/markbates/safe/Makefile

This file was deleted.

33 changes: 0 additions & 33 deletions v2/internal/takeon/github.com/markbates/safe/safe.go

This file was deleted.

8 changes: 0 additions & 8 deletions v2/internal/takeon/github.com/markbates/safe/shoulders.md

This file was deleted.

3 changes: 0 additions & 3 deletions v2/internal/takeon/github.com/markbates/safe/version.go

This file was deleted.

6 changes: 3 additions & 3 deletions v2/jam/parser/finder.go
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@ import (
"strings"
"time"

"github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer"
"github.com/gobuffalo/packr/v2/plog"
"github.com/karrick/godirwalk"
"github.com/markbates/errx"
"github.com/markbates/oncer"
)

type finder struct {
2 changes: 1 addition & 1 deletion v2/jam/parser/gogen.go
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import (
"strings"

"github.com/gobuffalo/packd"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx"
"github.com/markbates/errx"
)

// ParsedFile ...
2 changes: 1 addition & 1 deletion v2/jam/parser/parser_test.go
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@ import (
"strings"
"testing"

"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer"
"github.com/gobuffalo/packr/v2/jam/parser"
"github.com/gobuffalo/packr/v2/jam/store"
"github.com/markbates/oncer"
"github.com/stretchr/testify/require"
)

2 changes: 1 addition & 1 deletion v2/jam/parser/roots.go
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ import (
"path/filepath"
"time"

"github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk"
"github.com/gobuffalo/packr/v2/plog"
"github.com/karrick/godirwalk"
)

type RootsOptions struct {
2 changes: 2 additions & 0 deletions v2/jam/store/_fixtures/disk-pack/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module foo

go 1.14

require (
github.com/gobuffalo/packr/v2 v2.0.0-rc.2 // indirect
golang.org/x/tools v0.0.0-20181116193547-e77c06808af6 // indirect
5 changes: 3 additions & 2 deletions v2/jam/store/_fixtures/disk-pack/go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
@@ -191,8 +193,7 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs=
9 changes: 5 additions & 4 deletions v2/jam/store/disk.go
Original file line number Diff line number Diff line change
@@ -17,12 +17,13 @@ import (
"strings"
"sync"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/packr/v2/internal"
"github.com/karrick/godirwalk"

"github.com/gobuffalo/packr/v2/file/resolver/encoding/hex"
"github.com/gobuffalo/packr/v2/plog"
"github.com/rogpeppe/go-internal/modfile"

"github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk"
"github.com/gobuffalo/packr/v2/jam/parser"
"golang.org/x/sync/errgroup"
)
@@ -254,7 +255,7 @@ func (d *Disk) Close() error {
}

var ip string
if envy.Mods() {
if internal.Mods() {
// Starting in 1.12, we can rely on Go's method for
// resolving where go.mod resides. Prior versions will
// simply return an empty string.
@@ -285,7 +286,7 @@ func (d *Disk) Close() error {
ip = strings.Replace(ip, "\\", "/", -1)
} else {
ip = filepath.Dir(d.DBPath)
srcs := envy.GoPaths()
srcs := internal.GoPaths()
srcs = append(srcs, build.Default.SrcDirs()...)
for _, x := range srcs {
ip = strings.TrimPrefix(ip, "/private")
7 changes: 3 additions & 4 deletions v2/jam/store/disk_tmpl.go
2 changes: 1 addition & 1 deletion v2/packr.go
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@ import (
"fmt"

"github.com/gobuffalo/packr/v2/file/resolver"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe"
"github.com/gobuffalo/packr/v2/jam/parser"
"github.com/gobuffalo/packr/v2/plog"
"github.com/markbates/safe"
)

var boxes = &boxMap{}
3 changes: 0 additions & 3 deletions v2/packr2/cmd/fix/fix.go
Original file line number Diff line number Diff line change
@@ -6,12 +6,9 @@ import (
"os"
"strings"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/packr/v2/jam/store"
)

var modsOn = (strings.TrimSpace(envy.Get("GO111MODULE", "off")) == "on")

//YesToAll will be used by the command to skip the questions
var YesToAll bool

7 changes: 5 additions & 2 deletions v2/packr2/cmd/gocmd.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ import (
"path/filepath"
"strings"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/packr/v2/plog"
)

@@ -55,7 +54,11 @@ func goCmd(name string, args ...string) error {
}
}

cp := exec.Command(envy.Get("GO_BIN", "go"), cargs...)
goBin := os.Getenv("GO_BIN")
if goBin == "" {
goBin = "go"
}
cp := exec.Command(goBin, cargs...)
plog.Logger.Debug(strings.Join(cp.Args, " "))
cp.Stderr = os.Stderr
cp.Stdin = os.Stdin
2 changes: 1 addition & 1 deletion v2/packr2/cmd/version.go
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "shows packr version",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Print(packr.Version)
fmt.Println(packr.Version)
return nil
},
}
2 changes: 1 addition & 1 deletion v2/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package packr

// Version of Packr
const Version = "v2.7.1"
const Version = "v2.8.0"