Skip to content

Commit

Permalink
Allow to provide an inverse tranform in basic mode
Browse files Browse the repository at this point in the history
(undocumented feature)
  • Loading branch information
jpeletier committed Mar 6, 2018
1 parent fb075d3 commit 03c5bce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion diskv.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ func New(o Options) *Diskv {
} else {
o.AdvancedTransform = convertToAdvancedTransform(o.Transform)
}
o.InverseTransform = defaultInverseTransform
if o.InverseTransform == nil {
o.InverseTransform = defaultInverseTransform
}
} else {
if o.InverseTransform == nil {
panic("You must provide an InverseTransform function in advanced mode")
Expand Down

0 comments on commit 03c5bce

Please sign in to comment.