Modify the time sorter tests to make golint happy.

This commit changes the internal testing mechanism from returning the
unexported timeSorter type directly to insted returning sort.Interface.
This has been done because the latest version of golint complains about
return unexported types.
This commit is contained in:
Dave Collins 2014-10-11 13:30:08 -05:00
parent 208d4d79d7
commit e1c622c4cf

View file

@ -12,6 +12,7 @@ interface. The functions are only exported while the tests are being run.
package btcchain package btcchain
import ( import (
"sort"
"time" "time"
"github.com/conformal/btcutil" "github.com/conformal/btcutil"
@ -25,7 +26,7 @@ func TstSetCoinbaseMaturity(maturity int64) {
// TstTimeSorter makes the internal timeSorter type available to the test // TstTimeSorter makes the internal timeSorter type available to the test
// package. // package.
func TstTimeSorter(times []time.Time) timeSorter { func TstTimeSorter(times []time.Time) sort.Interface {
return timeSorter(times) return timeSorter(times)
} }