Skip to content

Commit

Permalink
Move bindata out of src
Browse files Browse the repository at this point in the history
  • Loading branch information
mpchadwick committed Nov 12, 2020
1 parent 9932d66 commit 4b8f18f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dbanon
dbanon.log
tmp/*
src/bindata.go
/bindata
.DS_Store
/dist
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LDFLAGS = -X main.version=$(VERSION)

build:
go get -u github.com/shuLhan/go-bindata/...
$$GOPATH/bin/go-bindata -pkg dbanon -o src/bindata.go etc/*
$$GOPATH/bin/go-bindata -pkg bindata -o bindata/bindata.go etc/*
GO111MODULE=on go get ./...
GO111MODULE=on go test $$GOPATH/src/github.com/mpchadwick/dbanon/src
GO111MODULE=on go build -ldflags "$(LDFLAGS)" -o dbanon main.go
Expand Down
3 changes: 2 additions & 1 deletion src/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dbanon

import (
"errors"
"github.com/mpchadwick/dbanon/bindata"
"gopkg.in/yaml.v2"
"io/ioutil"
"strings"
Expand Down Expand Up @@ -30,7 +31,7 @@ func NewConfig(requested string) (*Config, error) {

switch requested {
case "magento2":
source, _ = Asset("etc/magento2.yml")
source, _ = bindata.Asset("etc/magento2.yml")
default:
source, err = ioutil.ReadFile(requested)
if err != nil {
Expand Down

0 comments on commit 4b8f18f

Please sign in to comment.