This commit is contained in:
2025-03-27 21:43:36 +01:00
parent 76457d22cf
commit d41e2afe17

20
main.go
View File

@@ -96,6 +96,26 @@ func main() {
flag.Usage()
return
}
// The plan is:
// Load all commands
// Then aggregate all the globs and deduplicate them
// Resolve all the files for all the globs
// Read each file into memory (could be much? Probably not...
// Somehow connect files to commands via globs..
// Maybe do....
// For each file check every glob of every command
// Maybe memoize this part
// That way we know what commands affect what files
// Then for each file run all commands associated with the file
// Aggregate all the modifications and execute them
// Taking care of the whole duplicates and shit
// This will also relieve processor of some of the file loading
// But we will also have to rework the tests.......
// Also give each command its own logger, maybe prefix it with something... Maybe give commands a name?
// Do that with logger.WithField("loglevel", level.String())
// Since each command also has its own log level
// TODO: Maybe even figure out how to run individual commands...?
// TODO: What to do with git? Figure it out ....
commands, err = LoadCommandFromArgs(args, commands)
if err != nil {