rewrite html generator with html/template

This commit is contained in:
Altair-sh
2026-11-06 22:58:18 +01:00
parent 0bfa5ed35c
commit 509668088f
10 changed files with 363 additions and 110 deletions
+21
View File
@@ -0,0 +1,21 @@
package disk_usage
import "errors"
var ErrNotSupported = errors.New("disk_usage: not supported on this OS")
// Used + Free can be less than Total: space reserved for root/admin
// is not free for this process, but not used either.
type Usage struct {
// size of the file system (available to this user, if there are quotas)
Total int64
// Total minus all free space, including reserved
Used int64
// available to this process
Free int64
}
// DiskUsage returns usage of the file system that contains path.
func DiskUsage(path string) (Usage, error) {
return diskUsage(path)
}