gosimple / slug

URL-friendly slugify with multiple languages support.
Mozilla Public License 2.0
1.15k stars 108 forks source link

Structure for re-usability and concurrency #51

Open System-Glitch opened 3 years ago

System-Glitch commented 3 years ago

Description

Create a structure and make it implement the slug functions.

Benefits:

Drawback:

Example usage

s := slug.New()
s.MaxLength = 80
s.Make("Hello world")

Notes

This change is not breaking.

Similar to #41

codecov[bot] commented 3 years ago

Codecov Report

Merging #51 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #51   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           84        83    -1     
=========================================
- Hits            84        83    -1     
Impacted Files Coverage Δ
slug.go 100.00% <100.00%> (ø)
languages_substitution.go 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8535650...9d423a1. Read the comment docs.

mhotan commented 4 months ago

This patch would support closing https://github.com/argoproj/argo-cd/issues/18369. It's been some time since it was open. Is it worth re-evaluating, or is there an alternate solution?

System-Glitch commented 4 months ago

This patch would support closing argoproj/argo-cd#18369. It's been some time since it was open. Is it worth re-evaluating, or is there an alternate solution?

Hello, I forgot about this. It's been a while! I still think it would be a good addition worth re-evaluating. It should be updated though, as some options are missing from my PR.

mhotan commented 4 months ago

This patch would support closing argoproj/argo-cd#18369. It's been some time since it was open. Is it worth re-evaluating, or is there an alternate solution?

Hello, I forgot about this. It's been a while! I still think it would be a good addition worth re-evaluating. It should be updated though, as some options are missing from my PR.

Hello, yeah, it would be good to get this functionality. I also see this PR: https://github.com/gosimple/slug/pull/41 that attempts the same goal. I see @matrixik as the primary reviewer and feedback provider for the recent PRs. Maybe he could provide some guidance on how to get the ball rolling again. It probably won't make sense to update both PRs.