mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 00:27:47 +00:00
config: Port to LibMain :^)
This commit is contained in:
parent
65f4d868e5
commit
62ddd7613c
Notes:
sideshowbarker
2024-07-17 22:55:39 +09:00
Author: https://github.com/kennethmyhra
Commit: 62ddd7613c
Pull-request: https://github.com/SerenityOS/serenity/pull/11101
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bgianfo ✅
Reviewed-by: https://github.com/creator1creeper1 ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
2 changed files with 4 additions and 3 deletions
|
@ -7,8 +7,9 @@
|
|||
#include <LibConfig/Client.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
Core::EventLoop loop;
|
||||
String domain;
|
||||
|
@ -24,7 +25,7 @@ int main(int argc, char** argv)
|
|||
args_parser.add_positional_argument(group, "Group name", "group");
|
||||
args_parser.add_positional_argument(key, "Key name", "key");
|
||||
args_parser.add_positional_argument(value_to_write, "Value to write", "value", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(argc, argv);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
if (remove_key) {
|
||||
Config::remove_key(domain, group, key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue