Conversation
|
Hi Abolfazl👋 |
shahriaarrr
left a comment
There was a problem hiding this comment.
check this out in README.md
| return errEmptyTask | ||
| } | ||
|
|
||
| if newPriority != "" { |
There was a problem hiding this comment.
These sections need more changes. Although the task priority section is expected to return an error flag if it is empty, it doesn't do so. It also has a number of bugs that I will post as images in this PR that need to be fixed before merging.
There was a problem hiding this comment.
for example look at here:
C:\Users\shahr\OneDrive\Desktop\Tasky\cli\tasky>tasky.exe -a hello
Boom! Task added: hello 🤘➕. Priority:
Now go crush it like a boss—or just let it chill like your unread PMs😜!
C:\Users\shahr\OneDrive\Desktop\Tasky\cli\tasky>tasky.exe -l
╔═══╤═══════╤══════════╤═══════╤═══════════════════════╤══════════════╗
║ # │ Tasks │ Priority │ State │ Created At │ Completed At ║
╟━━━┼━━━━━━━┼━━━━━━━━━━┼━━━━━━━┼━━━━━━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━━━━━╢
║ 1 │ hello │ Medium │ ❌ │ 27 Mar 25 07:09 +0330 │ - ║
╟━━━┼━━━━━━━┼━━━━━━━━━━┼━━━━━━━┼━━━━━━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━━━━━╢
║ You have 1 pending tasks ║
╚═══╧═══════╧══════════╧═══════╧═══════════════════════╧══════════════╝Everything seems normal at this stage, but in the next comment we will test different situations and show bugs like this feature.
There was a problem hiding this comment.
now come here.
C:\Users\shahr\OneDrive\Desktop\Tasky\cli\tasky>tasky.exe -a hello -p test
Boom! Task added: hello test 🤘➕. Priority: test
Now go crush it like a boss—or just let it chill like your unread PMs😜!
C:\Users\shahr\OneDrive\Desktop\Tasky\cli\tasky>tasky.exe -l
╔═══╤════════════╤══════════╤═══════╤═══════════════════════╤══════════════╗
║ # │ Tasks │ Priority │ State │ Created At │ Completed At ║
╟━━━┼━━━━━━━━━━━━┼━━━━━━━━━━┼━━━━━━━┼━━━━━━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━━━━━╢
║ 1 │ hello │ Medium │ ❌ │ 27 Mar 25 07:09 +0330 │ - ║
║ 2 │ hello test │ Medium │ ❌ │ 27 Mar 25 07:14 +0330 │ - ║
╟━━━┼━━━━━━━━━━━━┼━━━━━━━━━━┼━━━━━━━┼━━━━━━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━━━━━╢
║ You have 2 pending tasks ║
╚═══╧════════════╧══════════╧═══════╧═══════════════════════╧══════════════╝Here are two bad things and one good thing.
-
One is that I gave this task a priority that wasn't in the list of valid priorities, but the task was registered, otherwise we should see an error here.
-
The good thing that happened here is that if you don't give a priority to the task, it automatically gives itself a
Mediumpriority. -
But here we see another thing. The priority that I gave to the task is also being stored in its title, which should not happen either.
This last case happens even if you give the task the correct priority, as you can see here:
C:\Users\shahr\OneDrive\Desktop\Tasky\cli\tasky>tasky.exe -a "hello world" -p High
Boom! Task added: hello world High 🤘➕. Priority: High
Now go crush it like a boss—or just let it chill like your unread PMs😜!
C:\Users\shahr\OneDrive\Desktop\Tasky\cli\tasky>tasky.exe -l
╔═══╤══════════════════╤══════════╤═══════╤═══════════════════════╤══════════════╗
║ # │ Tasks │ Priority │ State │ Created At │ Completed At ║
╟━━━┼━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━┼━━━━━━━┼━━━━━━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━━━━━╢
║ 1 │ hello │ Medium │ ❌ │ 27 Mar 25 07:09 +0330 │ - ║
║ 2 │ hello test │ Medium │ ❌ │ 27 Mar 25 07:14 +0330 │ - ║
║ 3 │ hello world High │ High │ ❌ │ 27 Mar 25 07:22 +0330 │ - ║
╟━━━┼━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━┼━━━━━━━┼━━━━━━━━━━━━━━━━━━━━━━━┼━━━━━━━━━━━━━━╢
║ You have 3 pending tasks ║
╚═══╧══════════════════╧══════════╧═══════╧═══════════════════════╧══════════════╝|
|
||
| # Build the project | ||
| go build ./cli/tasky | ||
|
|
There was a problem hiding this comment.
Before building the project, since we are using third-party modules, we must run the go get command in the project root to install the required modules.
|
Hi @Mirhajian |
|
Hi @Mirhajian |
A prettier README.md file
Added support to prioritize tasks (قابلیت اولویت بندی تسک ها)