Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Hovewer it is not bad to export such a function, if it is done purely for convenience. For example github.com/rs/zerolog works on a logger instances, which can be created manually, but they also provide a github.com/rs/zerolog/blob//log package, which provide you access to the global logger which is more convenient in most cases
Take a look at the sort package in standard library. It tests the public interface to sort mainly, but it also does internal testing of the heapsort function (but they use the export_test.go trick to export the internal functions as external but only for testing). So it doesn't test only public functions but also internal functions (ignore the export_test thing for now).