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

Add order_by option with support for 'string' ordering #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cscanlin-kwh
Copy link

Partially closes:
#122

Use case here is for any files which have a natural sorting, that is not semantic versioning.

In our case we want to timestamp each file using an isodate string, which gives us natural time based ordering (but this PR does not explicitly check file upload time)

I'm somewhat new to go, so please let me know if there are any ways to improve this implementation, thanks!

add WIP String versioning

add ExtractString test

add note to README

Signed-off-by: cscanlin <chris.scanlin@kwhanalytics.com>
@cscanlin-kwh cscanlin-kwh force-pushed the string-version-option branch from 0c5a0a0 to 81fe566 Compare April 29, 2023 04:52
return match, true
}

func Extract(path string, pattern string, order_by string) (Extraction, bool) {
Copy link
Author

Choose a reason for hiding this comment

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

Is this really the best way to do this kind of polymorphism in Go?

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.

1 participant