Skip to content
Permalink
Browse files

fix packr deprecated methods

  • Loading branch information...
mlapshin committed Jan 9, 2019
1 parent 1342774 commit e84a1a25bd77e9453271c3971e266562ddfbc497
Showing with 3 additions and 3 deletions.
  1. +2 −2 dbinit.go
  2. +1 −1 transform.go
@@ -40,13 +40,13 @@ func PerformInit(db *pgx.Conn, fhirVersion string, cb initProgressCb) error {
var functionStatements []string

box := packr.NewBox("./schema")
schema, err := box.MustBytes(fmt.Sprintf("fhirbase-%s.sql.json", fhirVersion))
schema, err := box.Find(fmt.Sprintf("fhirbase-%s.sql.json", fhirVersion))

if err != nil {
return errors.Wrapf(err, "Cannot find FHIR schema '%s'", fhirVersion)
}

functions, err := box.MustBytes("functions.sql.json")
functions, err := box.Find("functions.sql.json")

if err != nil {
return errors.Wrap(err, "Cannot find fhirbase function definitions")
@@ -137,7 +137,7 @@ func getTransformData(fhirVersion string) (map[string]interface{}, error) {
}

box := packr.NewBox("./transform")
trData, err := box.MustBytes(fmt.Sprintf("fhirbase-import-%s.json", fhirVersion))
trData, err := box.Find(fmt.Sprintf("fhirbase-import-%s.json", fhirVersion))

if err != nil {
return nil, errors.Wrapf(err, "failed to find transformations data for FHIR version %s", fhirVersion)

0 comments on commit e84a1a2

Please sign in to comment.
You can’t perform that action at this time.