The NCPDP package hasn't been touched in a while, and I'm not sure how exhaustive it is in covering the spec.
We used it in our backend when we were dealing with NCPDP, but currently we don't integrate with it.
and look at the API. Basically you'll be calling ncpdp.Unmarshal(data).
Since the NCPDP package is old and most likely not complete, and may not be useful for you, you can use
the edifact package directly and then you'll have to determine which parts of the edifact data you need
Again, you can check the test file to see how it's used: