var _ … type metricsStatFS … // NewMetricsStatfs creates a new metricsStatFS with the Volume path. func NewMetricsStatFS(path string) MetricsProvider { … } // See MetricsProvider.GetMetrics // GetMetrics calculates the volume usage and device free space by executing "du" // and gathering filesystem info for the Volume path. func (md *metricsStatFS) GetMetrics() (*Metrics, error) { … } // getFsInfo writes metrics.Capacity, metrics.Used and metrics.Available from the filesystem info func (md *metricsStatFS) getFsInfo(metrics *Metrics) error { … }