diff options
| author | Paul Buetow <paul@buetow.org> | 2026-07-05 00:24:02 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-07-05 00:24:02 +0300 |
| commit | fc0ce6f1918c4603254091d9fe77785996b56411 (patch) | |
| tree | 3d19847ceb646d703b29c444386db1431d4aeb65 | |
| parent | a1250c11b04b8ad0a713d801942aa3208b6a43de (diff) | |
more on tis
| -rw-r--r-- | TODO.md | 28 |
1 files changed, 20 insertions, 8 deletions
@@ -1,3 +1,22 @@ +## More ideas: + +Dont have to write: + +file.Have("file.txt", file.WithOwner("paul")) + +instead, have: + +file.Have("file.txt", WithOwner("paul")) + +and have all With... methods in a separate package which we import directly with *. + +for this, we need to make the With... functions more generic, based on interfaces and we have here for example + +type Owner interface { + SetOwner(owner string) +} + +and if there is no interface match, error! # TODO — Features needed to replace the dotfiles Rexfile This document lists the features `gonf` needs before it can replace the @@ -11,11 +30,7 @@ DONE! ## 2. Directory resource -DONE! `internal/resource/dir` provides a `Have`-style directory resource: -create if missing, enforce mode, idempotent, registers in the resource -registry. It also supports installing a source tree (`WithSource`), pruning -stale destination entries (`WithPrune`), and a file mode independent of the -directory's own mode (`WithFileMode`). +DONE! ## 3. Symlink resource @@ -113,6 +128,3 @@ just calls a hardcoded `examples.Run()`. Need: 6. Tasks + CLI (section 11), then git-config / line-in-file / polish (sections 9, 10, 12). -## More ideas: - -* Have file.Absent instead or as an alias for file.Have(path, IsAbsent()) or so |
