Commit graph

21 commits

Author SHA1 Message Date
9f05f933dd ♲ Refactor configuration to use viper with context propagation
- Replace global ConfigPath and Overrides with viper-based configuration
- Add viper.New() to create configurable viper instances
- Store viper and unmarshaled Config struct in context for testability
- Add RetrieveFromContext and AddToContext helper functions
- Update files.Append to accept context and retrieve config from it
- Update formatters.Preferred and formatters.New to accept context
- Add PersistentPreRunE in CLI to create and configure viper instance
- Support -c flag for custom config file path
- Support -v flag for config value overrides
- Update all test files to create viper and add to context
- Remove unused config types and load functions
- Add viper as dependency with automatic env var support (MYLOG_*)
2026-03-09 13:46:01 -05:00
8c23375208 Move CLI commands to cli/ package for extensibility
- Rename internal/cmd/ to cli/
- Export commands: RootCmd, DropCmd, ConfigCmd
- Enable custom app creation by importing cli package
2026-02-28 16:45:57 -06:00
ad7eba9b03 🚚 Refactor project structure to follow standard Go layout conventions 2025-11-05 16:07:48 -06:00
02a7babb36 Syntactic sugar in drop command for outputting json 2024-10-07 14:15:28 -05:00
bddf8e1458 Add -p flag to config 2024-05-08 15:04:18 -05:00
632c7143f1 Add null formatter 2024-03-11 21:18:52 -05:00
79fa957d02 Some convenience methods for Metas 2024-03-11 16:04:29 -05:00
8086029b03 🚚 Rename stdout.config.formatter to format 2024-03-10 21:08:34 -05:00
820a2de269 ♻️ Get rid of PartialEntry 2024-03-10 15:26:00 -05:00
febbce8a6b Add formatters.Preferred 2024-03-09 16:07:58 -06:00
99f6dc3f8c Use plain formatter to output entry from drop 2024-03-07 10:48:41 -06:00
0687671c7d 🐛 Ensure config directory exists 2024-02-25 15:53:37 -06:00
bc6c3d0f36 Parse date in drop command 2024-02-25 15:25:34 -06:00
391452e3d9 ParseDate should handle DateFormat 2024-02-25 12:36:43 -06:00
70b82761c2 Add tools.ParseDate 2024-02-24 20:38:27 -06:00
cc9e8f6167 Drop command 2024-02-11 13:50:27 -06:00
3546c1d7f6 Write config file 2024-02-10 13:35:47 -06:00
25f5c37243 Parse config overrides on cli 2024-02-09 09:44:35 -06:00
40f9518611 Load config from file with defaults 2024-02-04 18:19:19 -06:00
2da9fcac37 🔥 Remove viper 2024-02-04 14:01:29 -06:00
1eba4d6e79 🎉 Scaffold Cobra 2024-01-26 19:32:21 -06:00