Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [#410] Remove gookit/color, use pterm/pterm instead #479

Merged
merged 14 commits into from
May 21, 2024

Conversation

kkumar-gcc
Copy link
Member

@kkumar-gcc kkumar-gcc commented May 17, 2024

Closes goravel/goravel#410

πŸ“‘ Description

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

β„Ή Additional Information

@kkumar-gcc kkumar-gcc marked this pull request as draft May 17, 2024 04:10
Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 53.80435% with 85 lines in your changes are missing coverage. Please review.

Project coverage is 70.37%. Comparing base (bae87f1) to head (fd28b0d).

Files Patch % Lines
foundation/container.go 17.39% 19 Missing ⚠️
support/color/color.go 82.14% 10 Missing ⚠️
console/cli_context.go 0.00% 6 Missing ⚠️
config/application.go 0.00% 5 Missing ⚠️
database/console/migrate_refresh_command.go 16.66% 5 Missing ⚠️
foundation/console/vendor_publish_command.go 0.00% 5 Missing ⚠️
database/console/migrate_fresh_command.go 20.00% 4 Missing ⚠️
database/console/seed_command.go 20.00% 4 Missing ⚠️
database/console/migrate_rollback_command.go 25.00% 3 Missing ⚠️
auth/console/jwt_secret_command.go 33.33% 2 Missing ⚠️
... and 14 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #479      +/-   ##
==========================================
+ Coverage   70.30%   70.37%   +0.06%     
==========================================
  Files         172      173       +1     
  Lines       10538    10594      +56     
==========================================
+ Hits         7409     7455      +46     
- Misses       2562     2572      +10     
  Partials      567      567              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@kkumar-gcc kkumar-gcc changed the title feat: Remove gookit/color, use pterm/pterm instead feat: [#410] Remove gookit/color, use pterm/pterm instead May 17, 2024
@kkumar-gcc kkumar-gcc marked this pull request as ready for review May 19, 2024 10:31
@kkumar-gcc kkumar-gcc requested a review from a team May 19, 2024 10:37

func Whitep(a ...any) { white.Print(a...) }

func Sbluef(format string, a ...any) string { return blue.Sprintf(format, a...) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about color.Blue.Sprintf? All methods can change to this style. color.New(color.Green).Sprintf can be a basic method.

config/application.go Outdated Show resolved Hide resolved
support/color/color.go Outdated Show resolved Hide resolved
support/color/color.go Outdated Show resolved Hide resolved
support/color/color_test.go Outdated Show resolved Hide resolved
@kkumar-gcc kkumar-gcc closed this May 20, 2024
@kkumar-gcc kkumar-gcc reopened this May 20, 2024
@kkumar-gcc kkumar-gcc requested a review from hwbrzzl May 20, 2024 08:01
color.Yellow().Println("**************************************")
color.Yellow().Println("* Application In Production! *")
color.Yellow().Printfln("**************************************")
color.Default().Println(color.Green().Sprintf("Do you really wish to run this command? (yes/no) ") + "[" + color.Green().Sprintf("no") + "]" + ":")

var result string
_, err := fmt.Scanln(&result)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ctx.Confirm directly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be fixed in next PR. (make commands support -f flag)
image

Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

@kkumar-gcc kkumar-gcc merged commit db882c7 into master May 21, 2024
8 of 9 checks passed
@kkumar-gcc kkumar-gcc deleted the kkumar-gcc/#410 branch May 21, 2024 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ [Feature] Remove gookit/color, use pterm/pterm instead
2 participants